Difference between revisions of "User:Nineaxis/valve.js"

From Team Fortress Wiki
Jump to: navigation, search
m (Created page with 'var tf2w=new RegExp("(wiki.tf2.com|wiki.teamfortress.com)","i");var tf2s=new RegExp("Special:","i");if(tf2w.test(document.referrer)==true&&tf2s.test(document.referrer)==false){va…')
 
m
Line 1: Line 1:
var tf2w=new RegExp("(wiki.tf2.com|wiki.teamfortress.com)","i");var tf2s=new RegExp("Special:","i");if(tf2w.test(document.referrer)==true&&tf2s.test(document.referrer)==false){var regex=new RegExp("\/([a-zA-Z]{2})$|/ace$|/aln$|/als$|/ang$|/arc$|/arn$|/arz$|/ast$|/avk$|/bar$|/bat-smg$|/bcc$|/bcl$|/be-tarask$|/be-x-old$|/bpy$|/bqi$|/bto$|/bug$|/bxr$|/cbk-zam$|/cdo$|/ceb$|/cho$|/chr$|/chy$|/crh$|/crh-cyrl$|/crh-latn$|/csb$|/de-at$|/de-ch$|/de-formal$|/diq$|/dsb$|/eml$|/en-gb$|/ext$|/fiu-vro$|/frc$|/frp$|/fur$|/gag$|/gan$|/gan-hans$|/gan-hant$|/glk$|/got$|/grc$|/gsw$|/hak$|/haw$|/hif$|/hif-deva$|/hif-latn$|/hil$|/hsb$|/ike-cans$|/ike-latn$|/ilo$|/inh$|/jbo$|/jut$|/kaa$|/kab$|/kk-arab$|/kk-cn$|/kk-cyrl$|/kk-kz$|/kk-latn$|/kk-tr$|/kri$|/krj$|/ksh$|/ku-arab$|/ku-latn$|/lad$|/lbe$|/lez$|/lfn$|/lij$|/lld$|/lmo$|/loz$|/lzh$|/lzz$|/mai$|/map-bms$|/mdf$|/mhr$|/mus$|/mwl$|/myv$|/mzn$|/nah$|/nan$|/nap$|/nds$|/nds-nl$|/new$|/niu$|/nov$|/nrm$|/nso$|/pag$|/pam$|/pap$|/pdc$|/pdt$|/pfl$|/pih$|/plm$|/pms$|/pnb$|/pnt$|/pt-br$|/rif$|/rmy$|/roa-rup$|/roa-tara$|/ruq$|/ruq-cyrl$|/ruq-grek$|/ruq-latn$|/sah$|/scn$|/sco$|/sdc$|/sei$|/shi$|/simple$|/sma$|/sr-ec$|/sr-el$|/srn$|/stq$|/szl$|/tcy$|/tet$|/tg-cyrl$|/tg-latn$|/tokipona$|/tpi$|/tt-cyrl$|/tt-latn$|/tum$|/tyv$|/tzm$|/udm$|/ug-latn$|/vec$|/vep$|/vls$|/vro$|/war$|/wuu$|/xal$|/xmf$|/ydd$|/yue$|/zea$|/zh-classical$|/zh-cn$|/zh-hans$|/zh-hant$|/zh-hk$|/zh-min-nan$|/zh-mo$|/zh-my$|/zh-sg$|/zh-tw$|/zh-yue$");var countrycode=regex.exec(document.referrer);if(countrycode[0]!=regex.exec(location.href)){if(countrycode==null){countrycode[0]="";}var redirect=location.href.replace(regex,countrycode[0]);if(redirect!=location.href&&redirect!=document.referrer){location.href=redirect;}}}
+
var tf2w=new RegExp("(wiki.tf2.com|wiki.teamfortress.com)","i");var tf2s=new RegExp("Special:","i");if(tf2w.test(document.referrer)==true&&tf2s.test(document.referrer)==false){var regex=new RegExp("\/([a-zA-Z]{2})$|/ace$|/aln$|/als$|/ang$|/arc$|/arn$|/arz$|/ast$|/avk$|/bar$|/bat-smg$|/bcc$|/bcl$|/be-tarask$|/be-x-old$|/bpy$|/bqi$|/bto$|/bug$|/bxr$|/cbk-zam$|/cdo$|/ceb$|/cho$|/chr$|/chy$|/crh$|/crh-cyrl$|/crh-latn$|/csb$|/de-at$|/de-ch$|/de-formal$|/diq$|/dsb$|/eml$|/en-gb$|/ext$|/fiu-vro$|/frc$|/frp$|/fur$|/gag$|/gan$|/gan-hans$|/gan-hant$|/glk$|/got$|/grc$|/gsw$|/hak$|/haw$|/hif$|/hif-deva$|/hif-latn$|/hil$|/hsb$|/ike-cans$|/ike-latn$|/ilo$|/inh$|/jbo$|/jut$|/kaa$|/kab$|/kk-arab$|/kk-cn$|/kk-cyrl$|/kk-kz$|/kk-latn$|/kk-tr$|/kri$|/krj$|/ksh$|/ku-arab$|/ku-latn$|/lad$|/lbe$|/lez$|/lfn$|/lij$|/lld$|/lmo$|/loz$|/lzh$|/lzz$|/mai$|/map-bms$|/mdf$|/mhr$|/mus$|/mwl$|/myv$|/mzn$|/nah$|/nan$|/nap$|/nds$|/nds-nl$|/new$|/niu$|/nov$|/nrm$|/nso$|/pag$|/pam$|/pap$|/pdc$|/pdt$|/pfl$|/pih$|/plm$|/pms$|/pnb$|/pnt$|/pt-br$|/rif$|/rmy$|/roa-rup$|/roa-tara$|/ruq$|/ruq-cyrl$|/ruq-grek$|/ruq-latn$|/sah$|/scn$|/sco$|/sdc$|/sei$|/shi$|/simple$|/sma$|/sr-ec$|/sr-el$|/srn$|/stq$|/szl$|/tcy$|/tet$|/tg-cyrl$|/tg-latn$|/tokipona$|/tpi$|/tt-cyrl$|/tt-latn$|/tum$|/tyv$|/tzm$|/udm$|/ug-latn$|/vec$|/vep$|/vls$|/vro$|/war$|/wuu$|/xal$|/xmf$|/ydd$|/yue$|/zea$|/zh-classical$|/zh-cn$|/zh-hans$|/zh-hant$|/zh-hk$|/zh-min-nan$|/zh-mo$|/zh-my$|/zh-sg$|/zh-tw$|/zh-yue$");var countrycode=new Array();countrycode[0]="";if(regex.exec(document.referrer)!=null){countrycode[0]=regex.exec(document.referrer);}if(countrycode[0]!=regex.exec(location.href)){if(regex.exec(document.referrer)!=null){countrycode[0]="";}var redirect=location.href.replace(regex,countrycode[0]);if(redirect!=location.href&&redirect!=document.referrer){location.href=redirect;}}}

Revision as of 03:05, 27 December 2010

var tf2w=new RegExp("(wiki.tf2.com|wiki.teamfortress.com)","i");var tf2s=new RegExp("Special:","i");if(tf2w.test(document.referrer)==true&&tf2s.test(document.referrer)==false){var regex=new RegExp("\/([a-zA-Z]{2})$|/ace$|/aln$|/als$|/ang$|/arc$|/arn$|/arz$|/ast$|/avk$|/bar$|/bat-smg$|/bcc$|/bcl$|/be-tarask$|/be-x-old$|/bpy$|/bqi$|/bto$|/bug$|/bxr$|/cbk-zam$|/cdo$|/ceb$|/cho$|/chr$|/chy$|/crh$|/crh-cyrl$|/crh-latn$|/csb$|/de-at$|/de-ch$|/de-formal$|/diq$|/dsb$|/eml$|/en-gb$|/ext$|/fiu-vro$|/frc$|/frp$|/fur$|/gag$|/gan$|/gan-hans$|/gan-hant$|/glk$|/got$|/grc$|/gsw$|/hak$|/haw$|/hif$|/hif-deva$|/hif-latn$|/hil$|/hsb$|/ike-cans$|/ike-latn$|/ilo$|/inh$|/jbo$|/jut$|/kaa$|/kab$|/kk-arab$|/kk-cn$|/kk-cyrl$|/kk-kz$|/kk-latn$|/kk-tr$|/kri$|/krj$|/ksh$|/ku-arab$|/ku-latn$|/lad$|/lbe$|/lez$|/lfn$|/lij$|/lld$|/lmo$|/loz$|/lzh$|/lzz$|/mai$|/map-bms$|/mdf$|/mhr$|/mus$|/mwl$|/myv$|/mzn$|/nah$|/nan$|/nap$|/nds$|/nds-nl$|/new$|/niu$|/nov$|/nrm$|/nso$|/pag$|/pam$|/pap$|/pdc$|/pdt$|/pfl$|/pih$|/plm$|/pms$|/pnb$|/pnt$|/pt-br$|/rif$|/rmy$|/roa-rup$|/roa-tara$|/ruq$|/ruq-cyrl$|/ruq-grek$|/ruq-latn$|/sah$|/scn$|/sco$|/sdc$|/sei$|/shi$|/simple$|/sma$|/sr-ec$|/sr-el$|/srn$|/stq$|/szl$|/tcy$|/tet$|/tg-cyrl$|/tg-latn$|/tokipona$|/tpi$|/tt-cyrl$|/tt-latn$|/tum$|/tyv$|/tzm$|/udm$|/ug-latn$|/vec$|/vep$|/vls$|/vro$|/war$|/wuu$|/xal$|/xmf$|/ydd$|/yue$|/zea$|/zh-classical$|/zh-cn$|/zh-hans$|/zh-hant$|/zh-hk$|/zh-min-nan$|/zh-mo$|/zh-my$|/zh-sg$|/zh-tw$|/zh-yue$");var countrycode=new Array();countrycode[0]="";if(regex.exec(document.referrer)!=null){countrycode[0]=regex.exec(document.referrer);}if(countrycode[0]!=regex.exec(location.href)){if(regex.exec(document.referrer)!=null){countrycode[0]="";}var redirect=location.href.replace(regex,countrycode[0]);if(redirect!=location.href&&redirect!=document.referrer){location.href=redirect;}}}