משתמש:Yonidebest/monobook.js/junk1.js
מתוך ויקיפדיה, האנציקלופדיה החופשית
הערה: לאחר השמירה, עליכם לנקות את זכרון המטמון (Cache) של הדפדפן על־מנת להבחין בשינויים.
- במוזילה, פיירפוקס או ספארי, לחצו על מקש ה־Shift בעת לחיצתכם על העלה מחדש (Reload), או הקישו Ctrl+Shift+R (או Cmd+Shift+R במקינטוש של אפל).
- באינטרנט אקספלורר, לחצו על מקש ה־Ctrl בעת לחיצתכם על רענן (Refresh), או הקישו על Ctrl+F5.
- ב־Konqueror, פשוט לחצו על העלה מחדש (Reload), או הקישו על F5.
- באופרה, ייתכן שתצטרכו להשתמש בכלים (Tools) > העדפות (Preferences) כדי לנקות לחלוטין את זכרון המטמון.
// note to self - I used this to create new subpages for [[תבנית:דגל]]. Created by me - [[User:Yonidebest]]
function createSubPages() {
if (queryArray['country'] != null) {
editForm = document.getElementById('wpTextbox1');
var sCountry = queryArray['country'];
if (sCountry.lastIndexOf('\n') == sCountry.length) sCountry = sCountry.replace(/\n/g, "");
editForm.value = 'Flag of ' + sCountry + '.svg';
editForm.value += '<noinclude' + '>\n\n[[קטגוריה:תבניות - דגלים של מדינות|' + wgTitle.substring(4) + ']]<' + '/noinclude>';
document.editform.wpSummary.value = 'Flag of ' + sCountry + '.svg';
document.getElementById('editform').submit();
}
}
function createSubPagesClick() {
var countriesList = new Array();
countriesList = document.editform.wpTextbox1.value.split('|');
for (var i=0; i < countriesList.length; i++) {
var countries = new Array();
countries = countriesList[i].split('=');
var url = 'http://he.wikipedia.org/w/index.php?title=תבנית:דגל/' + decodeURI(countries[0]) + '&action=edit&bot=1&country=' + decodeURI(countries[1]);
window.open(url);
if (i == 30) break;
}
}
addOnloadHook(function () {
if (wgPageName == "משתמש:Yonidebest/רשימת_מדינות")
addLink('p-cactions', "javascript:createSubPagesClick()", 'צור - ניסוי', 'ca-test1', 'צור מה שצריך ליצור', '1', '');
createSubPages();
});

