User:Ews23/Vector.js
//<pre><nowiki>
//Monobook.js for User:EWS23
//Everything here has been borrowed from other entities
//and can be obtained at their respective user pages
// Admin tools
document.write('<script type="text/javascript" src="'
+ 'http://en.wikipedia.org/w/index.php?title=User:Voice_of_All/admin/monobook.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></script>');
//
popupAdminLinks=true;
Mvaluejsadmin = 'js887473pw8';
Rvaluejsadmin = '2pw981123js';
/////////////////////////////////////////////////////
//This tool has been copy/pasted into my monobook rather than
//simply using the original source page in order to obtain a
//preference I had for the spacing of vandal warnings using this tool.
//To get this tool, please see: [[User:Kbh3rd/Vandal warning toolbox]]
//
// Edit tools for the vandal whack-a-mole game
// [[User:Kbh3rd/whackamole.js]] - please include this line
//
//
/*
Put some functions in the toolbox for the anti-vandal whack-a-mole game.
Documented at http://en.wikipedia.org/wiki/User:Kbh3rd/Vandal_warning_toolbox
*/
//
// ****************
// Google Lookup
// ****************
function whackGoogleLookup () {
var q = "" + (window.getSelection ? window.getSelection()
: document.getSelection ? document.getSelection()
: document.selection.createRange().text);
if (!q)
q = prompt("You didn't select any text. Enter a search phrase:", "");
if (q!=null)
// location="http://www.google.com/search?q=" + escape(q).replace(/ /g, "+");
window.open("http://www.google.com/search?q=" + escape(q).replace(/ /g, "+") ,'new-tab') ;
}
// **************
// Warnings
// **************
function whackEdit (message, msg2, summary) {
var f = document.editform ;
var tbox = document.editform.wpTextbox1 ;
var a = "" + (window.getSelection ? window.getSelection()
: document.getSelection ? document.getSelection()
: document.selection.createRange().text);
if (msg2 != "") {
a = prompt ("Article name?\n(Empty+OK for a generic message.)\n(Cancel now aborts.)", a) ;
if (a == null) return ;
if (a != null && a != "") {
message = message.replace(/\|/,"|"+a) ;
summary += " in [[" + a + "]]" ;
} else {
message = msg2 ;
}
}
f.wpTextbox1.value += "" + message + " ~~~~ <br clear=\"both\">\n" ;
f.wpSummary.value = summary ;
f.wpMinoredit.checked=false;
f.wpWatchthis.checked=false;
f.wpTextbox1.focus();
if (f.wpTextbox1.scrollTop || true) f.wpTextbox1.scrollTop = f.wpTextbox1.scrollHeight ;
}
function whackWarn1 () { whackEdit ("{{subst:test1-n|}}", "{{subst:test1}}", "Experimenting"); }
function whackSelf () { whackEdit ("{{subst:selftest-n|}}", "{{subst:selftest}}","Self-reverted test"); }
function whackWarn2 () { whackEdit ("{{subst:test2-n|}}", "{{subst:test2}}", "Nonsense edit"); }
function whackWarn3 () { whackEdit ("{{subst:test3-n|}}", "{{subst:test3}}", "Please stop vandalizing"); }
function whackWarn4 () { whackEdit ("{{subst:test4-n|}}", "{{subst:test4}}", "Last chance on vandalism"); }
function whackBlank () { whackEdit ("{{subst:test2a-n|}}", "{{subst:test2a}}", "Blanking"); }
function whackBlatant() { whackEdit ("{{subst:bv-n|}}", "{{subst:bv}}", "Blatant vandalism"); }
function whackBlocked() { whackEdit ("{{subst:vblock}}", "", "Blocked"); }
function whackNPOV () { whackEdit ("{{subst:NPOV user}}", "", "[[WP:NPOV|Neutral POV]]"); }
function whackSpam () { whackEdit ("{{subst:spam-n|}}", "{{subst:spam}}", "Spam"); }
function whackObscene() { whackEdit ("{{subst:obscene-n|}}", "{{subst:obscene}}", "Obscenity"); }
function whackBlocked2(){whackEdit ("[[Image:Modern_clock_chris_kemps_01.png|left|32px]]"
+ "You have been temporarily [[Wikipedia:Blocking policy|blocked from editing]] because of your disruptive edits."
+ " You are [[Wikipedia:Contributing to Wikipedia|invited to contribute]]"
+ " in a [[Wikipedia:Five pillars|constructive manner]] as soon as the block expires.", "", "Blocked"); }
// **************************************************
// Installation
// **************************************************
window.whack_addlilink=function(tabs, url, name, id, title, key){
var na = document.createElement('a');
na.href = url;
na.appendChild(document.createTextNode(name));
var li = document.createElement('li');
if(id) li.id = id;
li.appendChild(na);
tabs.appendChild(li);
if(id) {
if(key && title) ta[id] = [key, title];
else if(key) ta[id] = [key, ''];
else if(title) ta[id] = ['', title];
}
// re-render the title and accesskeys from existing code in wikibits.js
akeytt();
return li;
}
window.whack_addToolboxLink=function(url, name, id){
var tb = document.getElementById('p-tb').getElementsByTagName('ul')[0];
whack_addlilink(tb, url, name, id);
}
window.playWhackMoles=function() {
if (document.title.match("Editing User talk:") ) {
whack_addToolboxLink('javascript:{whackWarn1();};void(0);', 'warn Test1', 'toolbox_warn1');
whack_addToolboxLink('javascript:{whackSelf ();};void(0);', 'warn Self Test', 'toolbox_selftest');
whack_addToolboxLink('javascript:{whackWarn2();};void(0);', 'warn Nonsense', 'toolbox_warn2');
whack_addToolboxLink('javascript:{whackWarn3();};void(0);', 'warn Please stop', 'toolbox_warn3');
whack_addToolboxLink('javascript:{whackWarn4();};void(0);', 'warn Last chance', 'toolbox_warn4');
whack_addToolboxLink('javascript:{whackBlank();};void(0);', 'warn Blanking', 'toolbox_warn2a');
whack_addToolboxLink('javascript:{whackBlatant();};void(0);', 'warn Blatant', 'toolbox_blatant');
whack_addToolboxLink('javascript:{whackBlocked2();};void(0);','warn *BLOCKED*', 'toolbox_block');
whack_addToolboxLink('javascript:{whackSpam ();};void(0);', 'warn Spam', 'toolbox_spam');
whack_addToolboxLink('javascript:{whackNPOV ();};void(0);', 'warn Npov', 'toolbox_npov');
whack_addToolboxLink('javascript:{whackObscene ();};void(0);','warn Obscene', 'toolbox_obscene');
} else {
whack_addToolboxLink('javascript:{whackGoogleLookup();};void(0);', 'Google', 'toolbox_googlelookup');
}
}
// onload
window.simpleAddOnload=function(f) {
if (window.addEventListener) window.addEventListener("load", f, false);
else if (window.attachEvent) window.attachEvent("onload",f);
}
simpleAddOnload(playWhackMoles);
//Retrieved from "http://en.wikipedia.org/wiki/User:Kbh4th/whackamole.js"
//Interiot's javascript edit counter
if (document.title.indexOf('User:Interiot/Tool2/code.js') != -1) {
mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Interiot/Tool2/code.js&action=raw&ctype=text/javascript'); }
//[[Category:VoA scripted admins|{{PAGENAME}}]]
/////////////////////////////////////////////////////////</nowiki></pre>
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.