MediaWiki:Common.js: Difference between revisions

From Cives
Jump to navigationJump to search
No edit summary
No edit summary
Line 6: Line 6:
var paragraph = document.createElement("p");
var paragraph = document.createElement("p");
paragraph.textContent = "By logging in, you agree to the";
paragraph.textContent = "By logging in, you agree to the";
// Create a new anchor element for the "Terms of use" link
var termsLink = document.createElement("a");
var termsLink = document.createElement("a");
termsLink.textContent = "Terms of use and privacy policy";
termsLink.textContent = "Terms of use and privacy policy";
Line 13: Line 11:
paragraph.appendChild(termsLink);
paragraph.appendChild(termsLink);
userloginForm.appendChild(paragraph);
userloginForm.appendChild(paragraph);
console.log("Hello world!");

Revision as of 15:04, 12 March 2024

/* Any JavaScript here will be loaded for all users on every page load. */
$('#t-print').remove();

var userloginForm = document.getElementById("userloginForm");

var paragraph = document.createElement("p");
paragraph.textContent = "By logging in, you agree to the";
var termsLink = document.createElement("a");
termsLink.textContent = "Terms of use and privacy policy";
termsLink.href = "https://cives.uni-lj.si/index.php?title=Terms_of_use"; 
paragraph.appendChild(termsLink);
userloginForm.appendChild(paragraph);

console.log("Hello world!");