New Immissions/Updates:
boundless - educate - edutalab - empatico - es-ebooks - es16 - fr16 - fsfiles - hesperian - solidaria - wikipediaforschools
- wikipediaforschoolses - wikipediaforschoolsfr - wikipediaforschoolspt - worldmap -

See also: Liber Liber - Libro Parlato - Liber Musica  - Manuzio -  Liber Liber ISO Files - Alphabetical Order - Multivolume ZIP Complete Archive - PDF Files - OGG Music Files -

PROJECT GUTENBERG HTML: Volume I - Volume II - Volume III - Volume IV - Volume V - Volume VI - Volume VII - Volume VIII - Volume IX

Ascolta ""Volevo solo fare un audiolibro"" su Spreaker.
CLASSICISTRANIERI HOME PAGE - YOUTUBE CHANNEL
Privacy Policy Cookie Policy Terms and Conditions
User:GeorgeMoney/UserScripts/autowelcome - Wikipedia, the free encyclopedia

User:GeorgeMoney/UserScripts/autowelcome

From Wikipedia, the free encyclopedia

//

//Auto welcome user script written by GeorgeMoney
if(welcome == undefined) {
//If you would like to make your own config you have 2 options:
//1:Copy the entire code to your monobook and change the config
//2:Copy everything, from this line until you see 'end config', into your monobook.js, and include the module to your monobook via an import function

var welcome={};welcome.edit={};welcome.link={};welcome.link.tab={};welcome.link.newUserLog={};welcome.link.redLinkTalk={};welcome.options={};

//config
welcome.edit.summary = "Welcome to Wikipedia!";
welcome.edit.text = "{{sub" + "st:User:GeorgeMoney/Welcome}}" + "\n" + "~~" + "~~";
welcome.edit.textAnon = "{{sub" + "st:Welcomeip}}" + "\n" + "~~" + "~~";
welcome.edit.button = 'wpSave';

welcome.link.newUserLog.defaultColor = "blue";
welcome.link.newUserLog.clickedColor = "green";
welcome.link.newUserLog.text = "[welcome]";

welcome.link.redLinkTalk.defaultColor = "blue";
welcome.link.redLinkTalk.clickedColor = "green";
welcome.link.redLinkTalk.text = "[welcome]";
welcome.link.redLinkTalk.blink = false;

welcome.link.tab.text = "welcome!";
welcome.link.tab.accessKey = 'a';

welcome.options.newUserLogaddReloadButton = true;
welcome.options.newUserLogEnabled = true;
welcome.options.redLinkTalkEnabled = true;
welcome.options.addTab = true;
welcome.options.askIfPageIsNotBlank = true;
welcome.options.maxLinks = 1000;
welcome.options.warnIfOverMaxLinks = false;

//end config

}
//main script
if(welcome.options.newUserLogEnabled && (/Special(%3A|:)Log(\/newusers$|(.*?&|\?)type=newusers)/i).test(window.location.href)) {
        if(window.location.hash != "") window.location.hash = "";
        else {
                addOnloadHook(function() {
                        var lis = document.getElementById('bodyContent').getElementsByTagName('ul')[0].getElementsByTagName('li');
                        for (var i=0; i<lis.length; i++) {
                                var li = lis[i];
                                var url = li.firstChild.nextSibling.nextSibling.nextSibling.href;
                                var charao = (url.indexOf('?') != -1)?'&':'?';
                                url += charao+"autowelcome=true"
                                var link = document.createElement('a');
                                link.appendChild(document.createTextNode(welcome.link.newUserLog.text));
                                link.style.color = welcome.link.newUserLog.defaultColor;
                                monclick = function() {
                                        //this.style = { };
                                        this.style.textDecoration = 'none';
                                        this.style.color = welcome.link.newUserLog.clickedColor;
                                                var n = parseInt(this.name.split('_')[2]);
                                                var newhref = "#anchor_welcome_"+(n+1);
                                        this.onmouseover = function() { return false; }
                                        this.onfocus = function() { return false; }
                                        this.onclick = function() { 
                                                window.open(this.href); 
                                                this.onclick = function() { return false; }; 
                                                return false; 
                                        }
                                        this.onmousedown = function() { return false; }
                                        this.onmouseup = function() { return false; }
                                        this.onmouseout = function() { 
                                                //var n = parseInt(this.name.split('_')[2]);
                                                //var newhref = "#anchor_welcome_"+(n+1);
                                                //this.href /**/+= '&hasdone=true'; //newhref;
                                                //this.href=newhref;
                                                this.href = "javascript:void(0);";
                                                this.onmouseout = function() {
                                                        return false;
                                                }
                                        };
                                        //this.href = newhref;
                                        //this.tagName = 'SPAN';
                                        //this.innerHTML = 'welcomed';
                                        this.style.cursor = "default";
                                };
                                //link.onfocus = monclick;
                                link.onmouseup = monclick;
                                link.href = url;
                                link.id = "id_welcome_"+i;
                                link.name = "anchor_welcome_"+i;
                                li.appendChild(link);
                        }
                        
                        if(welcome.options.newUserLogaddReloadButton) {
                                var h1 = document.getElementsByTagName('h1')[0];
                                var button = document.createElement('input');
                                button.onclick = function() { 
                                        if(window.location.hash != "") 
                                                window.location.hash = "";
                                        location.reload();
                                }
                                button.value = "reload";
                                button.type = "button";
                                h1.parentNode.insertBefore(button, h1.nextSibling);
                        }
                });
        }
}

if(welcome.options.redLinkTalkEnabled && !((/Special(%3A|:)Log(\/newusers$|(.*?&|\?)type=newusers)/i).test(window.location.href)) && ( ( (wgNamespaceNumber > -1 && wgNamespaceNumber % 2 != 0) || (wgCanonicalNamespace == "Wikipedia"||wgCanonicalNamespace == 'Special') ) || !wgIsArticle )) {
        addOnloadHook(function() {
                var alinks = document.getElementById('bodyContent').getElementsByTagName('a');
                if(alinks.length > welcome.options.maxLinks) {
                        if(welcome.options.warnIfOverMaxLinks)
                                var ok_to_go = confirm("This page has over "+welcome.options.maxLinks+" links.\n"
                                +"Searching for red links to add welcome links might take a while and freeze your"
                                +" browser\nTo continue and add welcome links, press ok.");
                        else var ok_to_go = false;
                } else var ok_to_go = true;
                if(!ok_to_go) return;
                for(var i=0, j=0; i<alinks.length; i++) {
                        var lin = alinks[i];
                        if(lin.className == "new" && (/User([_ ]talk)?:/i).test(lin.href) && lin.href.substr('http://en.wikipedia.org/w/index.php?title='.length).indexOf('/') == -1) {
                                var url = lin.href;
                                url = url.replace('User:', 'User_talk:');
                                var charao = (url.indexOf('?') != -1)?'&':'?';
                                url += charao+"autowelcome=true"
                                var nlin = document.createElement('a');
                                nlin.appendChild(document.createTextNode(welcome.link.redLinkTalk.text));
                                nlin.style.color = welcome.link.redLinkTalk.defaultColor;
                                monclick = function() {
                                        this.style.textDecoration = 'none';
                                        this.style.color = welcome.link.redLinkTalk.clickedColor;
                                                var n = parseInt(this.name.split('_')[2]);
                                                var newhref = "#anchor_welcome_"+(n+1);
                                        this.onmouseover = function() { return false; }
                                        this.onfocus = function() { return false; }
                                        this.onclick = function() { 
                                                window.open(this.href); 
                                                this.onclick = function() { return false; }; 
                                                return false; 
                                        }
                                        this.onmousedown = function() { return false; }
                                        this.onmouseup = function() { return false; }
                                        this.onmouseout = function() { 
                                                //var n = parseInt(this.name.split('_')[2]);
                                                //var newhref = "#anchor_welcome_"+(n+1);
                                                //this.href /**/+= '&hasdone=true'; //newhref;
                                                //this.href=newhref;
                                                this.href = "javascript:void(0);";
                                                this.onmouseout = function() {
                                                        return false;
                                                }
                                        };
                                        //this.href = newhref;
                                        //this.tagName = 'SPAN';
                                        //this.innerHTML = 'welcomed';
                                        this.style.cursor = "default";
                                };
                                nlin.onmouseup = monclick;
                                nlin.href = url;
                                nlin.id = "id_welcome_"+j;
                                nlin.name = "anchor_welcome_"+j;
                                if(welcome.link.redLinkTalk.blink) nlin.style.textDecoration = 'blink';
                                
                                try { //alert(lin+lin.href+lin.className+lin.innerHTML+lin.nextSibling);
                                        if(lin.nextSibling) {
                                                lin.parentNode
                                                        .insertBefore(
                                                                nlin, 
                                                                lin.nextSibling
                                                        );
                                        } else { 
                                                lin.parentNode
                                                        .appendChild(
                                                                nlin
                                                        );
                                        
                                        }
                                        j++;
                                } catch(e) {
                                        //alert(lin+lin.href+lin.className+lin.innerHTML+lin.nextSibling);
                                        //alert(e.toString());
                                }
                        }
                }
        });
}

if(welcome.options.addTab && ( wgCanonicalNamespace == 'User' || wgCanonicalNamespace == 'User_talk' ) ) {
        addOnloadHook(function() {
                try {
                        var href = document.getElementById('ca-edit').firstChild.href;
                        var charao = (href.indexOf('?') != -1)?'&':'?';
                        href += charao+"autowelcome=true";
                        if(wgCanonicalNamespace == 'User') href = href.replace(/User:/i, 'User_talk:');
                        var tbs = document.getElementById('p-cactions').getElementsByTagName('ul')[0];
                        addlilink(tbs, href, welcome.link.tab.text, 'ca-welcome', 'Welcome '+wgTitle, welcome.link.tab.accessKey);
                } catch(e) { }
        });
}

if(window.location.href.indexOf('autowelcome=true') != -1
&&window.location.href.indexOf('action=edit') == -1) {
        window.location.href += '&action=edit';
}

if(window.location.href.indexOf('action=edit') != -1 
&& window.location.href.indexOf('autowelcome=true') != -1) {
        if(window.location.href.indexOf('hasdone=true') != -1) {
                location.href = location.href.split('action=edit')[0]
                                                .split('autowelcome=true')[0];
        } else {
                addOnloadHook(function() {
                        var text = document.getElementById('wpTextbox1').value;
                        if(welcome.options.askIfPageIsNotBlank && text != '') {
                                var oktogo = confirm("There was other text detected on this page\nWould you like to continue with the welcome?");
                        } else var oktogo = true;
                        var newtext = text + '\n';
                        if((/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/).test(wgPageName))
                                newtext += welcome.edit.textAnon;
                        else 
                                newtext += welcome.edit.text;
                        document.getElementById('wpTextbox1').value = newtext;
                        document.getElementById('wpSummary').value = welcome.edit.summary;
                        if(!oktogo) return;
                        document.getElementById(welcome.edit.button).click();
                });
        }
}

//

Static Wikipedia (no images)

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -

Static Wikipedia 2007 (no images)

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -

Static Wikipedia 2006 (no images)

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu

Static Wikipedia February 2008 (no images)

aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu