User:Currentlybiscuit/vector.js
$(function() {
if (document.location.href.indexOf("Special:Watchlist") < 0) return;
var temp = document.getElementsByTagName("a");
var links = [];
for (var i = 0; i < temp.length; i++) {
links.push(temp[i]);
}
for (var i = links.length - 1; i >= 0; i--) {
var link = links[i];
var nextOne = link.nextSibling;
if (!nextOne || !nextOne.nodeValue) continue;
var s = nextOne.nodeValue.toString();
if (nextOne.nodeType != 3) continue;
if (s.charCodeAt(0) != 8206 || s.charCodeAt(1) != 32) continue;
if (link.href.indexOf("/wiki/") >= 0 &&
link.className != "unwatch-link" &&
link.innerHTML != "talk" &&
link.innerHTML != "contribs" &&
link.href.indexOf("#") < 0) {
var s = link.href.indexOf("/wiki/");
var articleName = link.href.substr(s + 6, link.href.length);
console.info(articleName);
var e = document.createElement("a");
e.setAttribute("href", "/w/index.php?title=" + articleName + "&action=unwatch");
e.innerHTML = "[x] ";
e.className = "unwatch-link"
link.parentNode.insertBefore(e, link);
}
}
});
// Twinkle configuration
if( typeof( TwinkleConfig ) == 'undefined' ) TwinkleConfig = {};
TwinkleConfig.portletId = 'p-views';
// This tool taken directly from [[en:User:Ilmari Karonen/rollbacksummary.js]]
//
// Prompt for an edit summary when clicking a rollback link
$(function () {
var serverRe = wgServer.replace(/([^A-Za-z0-9_])/g, "\\$1");
var scriptRe = wgScript.replace(/([^A-Za-z0-9_])/g, "\\$1");
var rollbackRe = new RegExp ("^(" + serverRe + ")?" + scriptRe + "\\?([^#]*&)?action=rollback(&|$)");
var promptSummary = function () {
var summary = prompt("Enter rollback summary (or leave as \"default\" to use default summary):", "default");
if (summary == null || summary == "") return false;
if (summary == "default") return true;
this.href = this.href.replace("?", "?summary=" + encodeURIComponent(summary) + "&");
return true;
};
var links = document.getElementsByTagName("a");
for (var i = 0; i < links.length; i++) {
if (rollbackRe.test(links[i].href)) links[i].onclick = promptSummary;
}
});
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.