MediaWiki:Common.js: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
document.addEventListener("DOMContentLoaded", function () { | document.addEventListener("DOMContentLoaded", function () { | ||
const links = document.querySelectorAll(" | const links = document.querySelectorAll("a.download-link"); | ||
for (const link of links) { | for (const link of links) { | ||
link.setAttribute("target", "_blank"); | |||
link.setAttribute("rel", "noopener noreferrer"); | |||
link.setAttribute("download", ""); | |||
} | } | ||
}); | }); | ||
Latest revision as of 20:07, 17 April 2025
document.addEventListener("DOMContentLoaded", function () {
const links = document.querySelectorAll("a.download-link");
for (const link of links) {
link.setAttribute("target", "_blank");
link.setAttribute("rel", "noopener noreferrer");
link.setAttribute("download", "");
}
});