コンテンツにスキップ

英文维基 | 中文维基 | 日文维基 | 草榴社区

「利用者:Was a bee/markAdmins.js」の版間の差分

削除された内容 追加された内容
Was a bee (会話 | 投稿記録)
m stewards
Was a bee (会話 | 投稿記録)
m update
104行目: 104行目:
// Brion_Testaccount: weil Brion irgendwas testen wollte...
// Brion_Testaccount: weil Brion irgendwas testen wollte...
// ★★★ 管理者の一覧 ★★★
// ★★★ 管理者の一覧 ★★★
var admins=new Array("Baldanders", "Bellcricket", "Bletilla", "Carkuni", "Cassiopeia_sweet", "Chatama", "Ciro", "Cpro", "Electric_goat", "Faso", "Freetrashbox", "Giftlists", "KMT", "Kahusi", "Kamakura", "Kanjy", "Kamakura", "Kinori", "Kiyok", "Kkkdc", "Kotoito", "Ks_aka_98", "Kurihaya", "Law_soma", "Los688", "Lupinoid", "Makotoy", "Marine-Blue", "Miya", "Mnd", "Mobnoboka", "Muyo", "Nnh", "Panpulha", "Peccafly", "Penn_Station", "Riden", "Sergei_1207", "Snow_steed", "Sumaru", "Taisyo", "Tan90deg", "Tantal", "Tietew", "Tomos", "Triglav", "VZP10224", "Vigorous_action", "W.CC", "Y-dash", encodeURI("おはぐろ蜻蛉"), encodeURI("しるふぃ"), encodeURI("アイザール"), encodeURI("三日月"), encodeURI("健ちゃん"), encodeURI("東京特許許可局"), encodeURI("欅"), encodeURI("海獺"), encodeURI("白駒"), encodeURI("竹麦魚"), encodeURI("背番号9"), encodeURI("赤の旋律"), encodeURI("霧木諒二"), encodeURI("青子守歌"));
var admins=new Array("Baldanders", "Bellcricket", "Bletilla", "Carkuni", "Cassiopeia_sweet", "Chatama", "Ciro", "Cpro", "Electric_goat", "Faso", "Freetrashbox", "Giftlists", "Jkr2255", "KMT", "Kahusi", "Kamakura", "Kanjy", "Kamakura", "Kinori", "Kiyok", "Kkkdc", "Kotoito", "Ks_aka_98", "Kurihaya", "Law_soma", "Los688", "Lupinoid", "Makotoy", "Marine-Blue", "Miya", "Mnd", "Mobnoboka", "Muyo", "Nnh", "Panpulha", "Peccafly", "Penn_Station", "Riden", "Sergei_1207", "Snow_steed", "Sumaru", "Taisyo", "Tan90deg", "Tantal", "Tietew", "Tomos", "Triglav", "VZP10224", "Vigorous_action", "W.CC", "Y-dash", encodeURI("おはぐろ蜻蛉"), encodeURI("しるふぃ"), encodeURI("アイザール"), encodeURI("三日月"), encodeURI("健ちゃん"), encodeURI("東京特許許可局"), encodeURI("欅"), encodeURI("海獺"), encodeURI("白駒"), encodeURI("竹麦魚"), encodeURI("背番号9"), encodeURI("赤の旋律"), encodeURI("霧木諒二"), encodeURI("青子守歌"));
var admins_str = '|'+admins.join('|')+'|';
var admins_str = '|'+admins.join('|')+'|';
// ★★★ ビューロクラットの一覧 ★★★
// ★★★ ビューロクラットの一覧 ★★★
var bureaucrats=new Array("Bellcricket", "Carkuni", "Chatama", "Kanjy", "Ks_aka_98", "Penn_Station", "Tomos");
var bureaucrats=new Array("Bellcricket", "Carkuni", "Chatama", "Kanjy", "Ks_aka_98", "Penn_Station", "Tomos", "Vigorous_action", encodeURI("欅"));
var bureaucrats_str = '|'+bureaucrats.join('|')+'|';
var bureaucrats_str = '|'+bureaucrats.join('|')+'|';
195行目: 195行目:
// Notes: nö
// Notes: nö
// ★★★ チェックユーザーの一覧 ★★★
// ★★★ チェックユーザーの一覧 ★★★
var checkuser=new Array("Bellcricket", "Cassiopeia_sweet", "Chatama", "Kanjy", "Ks_aka_98", "Marine-Blue", encodeURI("海獺"));
var checkuser=new Array("Bellcricket", "Cassiopeia_sweet", "Chatama", "Kanjy", "Ks_aka_98", "Marine-Blue", "Vigorous_action", encodeURI("欅"), encodeURI("海獺"));
var checkuser_str = '|'+checkuser.join('|')+'|';
var checkuser_str = '|'+checkuser.join('|')+'|';

2011年2月11日 (金) 18:28時点における版

//<source lang="javascript">
//管理者などが増減した場合、★マークがついてる部分を更新します。
 var markadmins = true;           // Admins u.ä. besonders hervorheben?
 var marksubpages = false;        // auch Links auf Admin-Unterseiten markieren?
 var mawatchlist = true;          // auch auf der Beobachtungsliste?
 var macontribs = true;           // auch auf den Benutzerbeiträgen?
 
 var markatxt = "管";              // 管理者。Markierung für Admins
 var markrenatxt = "A-Ren";       // Markierung für umbenannte Admins
 
 var markbureautxt = "ビ";         // ビューロクラット。Markierung für Bürokraten
 var markstewtxt = "ス";           // スチュワード。Markierung für Stewards
 
 var markarbcom = true;           // zusätzlich: Schiedsgericht besonders hervorheben?
 var markarbcomtxt = "SG";        // Markierung für Schiedsgerichtler
 
 var markcheckuser = true;        // zusätzlich: CheckUser besonders hervorheben?
 var markcheckusertxt = "C";     // チェックユーザー。Markierung für Checkuser-Berechtigte
 var markombudsmantxt = "オ";    // オンブズマン。Markierung für Ombudspersonen
 
 var markoversight = true;        // zusätzlich: Oversights besonders hervorheben?
 var markoversighttxt = "OS";     // オーバーサイト。Markierung für Oversight-Berechtigte
 
 // get URL parameters (used for page type variables)
 var UrlParameters = new Array ();
 readparams();
 
 function readparams() {
  var asReadInUrlParameters;
  var asReadInUrlParameter;
 
  // Get URL parameters
  asReadInUrlParameters = location.search.substring(1, location.search.length).split("&");
  for (i = 0; i < asReadInUrlParameters.length; i++) {
    asReadInUrlParameter = asReadInUrlParameters[i].split("=");
    UrlParameters[decodeURIComponent(asReadInUrlParameter[0])] = decodeURIComponent(asReadInUrlParameter[1]);
  }
 }
 
 // page type variables: namespace == -1
 var isSpecial   = (wgCanonicalNamespace == "Special");
 var isContrib   = (isSpecial && (wgTitle == "投稿記録"));
 var isWatchlist = (isSpecial && (wgTitle == "ウォッチリスト"));

 
 //***********************************************************************
 // Skript ursprünglich von [[Benutzer:Euku]], 28. Dez. 2005
 // Ex-Admin-Markierung von [[Benutzer:Sir]] und [[Benutzer:Olliminatore]]
 // Adaptierung/zusätzliche Markierungen/Fixes: [[Benutzer:PDD]]
 // Aufgeräumt & beschleunigt: [[Benutzer:Littl]]
 // Etwas umgeräumt und potentielle Skinabhängigkeit entfernt: [[Benutzer:Guandalug]]
 //***********************************************************************
 
 // <nowiki>
 
 function markAdmins() {
 
   // Variables that should be defined in your monobook
   if (typeof(markadmins) == 'undefined')
       markadmins = true;
   if (typeof(markcomadmins) == 'undefined')
       markcomadmins = false;
   if (typeof(markexadmins) == 'undefined')
       markexadmins = false;
 
   if (typeof(markarbcom) == 'undefined')
       markarbcom = true;
   if (typeof(markoversight) == 'undefined')
       markoversight = true;
   if (typeof(markcheckuser) == 'undefined')
       markcheckuser = true;
 
   if (!markadmins && !markcomadmins && !markexadmins) 
       return; //nichts zu tun, schnell weg hier
 
   var langUser = "利用者:";        // in German 'Benutzer:'
 
   if (typeof(marksubpages) == 'undefined')
       marksubpages = false;
   if (typeof(dontmarkmyself) == 'undefined')
       dontmarkmyself = false;
   if (typeof(isSpecial) == 'undefined')
       isSpecial = (wgCanonicalNamespace == "Special");
   if (typeof(isHistory) == 'undefined')
       isHistory = (wgAction == 'history'); 
   if (typeof(isUserpage) == 'undefined')
       isUserpage = ( (wgCanonicalNamespace == "User") || (wgCanonicalNamespace == "User_talk") );
   if (typeof(isTalk) == 'undefined')
       isTalk = (wgNamespaceNumber %2 == 1); 
   if (typeof(isProject) == 'undefined')
       isProject = (wgCanonicalNamespace == "Project");
   if (typeof(isDatei) == 'undefined')
       isDatei = (wgCanonicalNamespace == "File");
   if (typeof(isHelp) == 'undefined')
       isHelp = (wgCanonicalNamespace == "Help");
   if (typeof(isDiff) == 'undefined')
       isDiff = UrlParameters["diff"];
 
   if (markadmins) {
 // statische Liste (dynamisch: http://toolserver.org/~aka/dewiki_admins_utf8.txt )
 // Stand: 12.10.2010
 // Hei_ber: als Ombudsmann 7.12.2007-8.7.2008
 // Domas_Mituzas: als Developer (??) seit 10.6.2009
 // Brion_Testaccount: weil Brion irgendwas testen wollte...
 // ★★★ 管理者の一覧 ★★★
 var admins=new Array("Baldanders", "Bellcricket", "Bletilla", "Carkuni", "Cassiopeia_sweet", "Chatama", "Ciro", "Cpro", "Electric_goat", "Faso", "Freetrashbox", "Giftlists", "Jkr2255", "KMT", "Kahusi", "Kamakura", "Kanjy", "Kamakura", "Kinori", "Kiyok", "Kkkdc", "Kotoito", "Ks_aka_98", "Kurihaya", "Law_soma", "Los688", "Lupinoid", "Makotoy", "Marine-Blue", "Miya", "Mnd", "Mobnoboka", "Muyo", "Nnh", "Panpulha", "Peccafly", "Penn_Station", "Riden", "Sergei_1207", "Snow_steed", "Sumaru", "Taisyo", "Tan90deg", "Tantal", "Tietew", "Tomos", "Triglav", "VZP10224", "Vigorous_action", "W.CC", "Y-dash", encodeURI("おはぐろ蜻蛉"), encodeURI("しるふぃ"), encodeURI("アイザール"), encodeURI("三日月"), encodeURI("健ちゃん"), encodeURI("東京特許許可局"), encodeURI("欅"), encodeURI("海獺"), encodeURI("白駒"), encodeURI("竹麦魚"), encodeURI("背番号9"), encodeURI("赤の旋律"), encodeURI("霧木諒二"), encodeURI("青子守歌"));
 
       var admins_str = '|'+admins.join('|')+'|';
       // ★★★ ビューロクラットの一覧 ★★★
       var bureaucrats=new Array("Bellcricket", "Carkuni", "Chatama", "Kanjy", "Ks_aka_98", "Penn_Station", "Tomos", "Vigorous_action", encodeURI("欅"));
       var bureaucrats_str = '|'+bureaucrats.join('|')+'|';
 
       // Stewards: Abgleich mit http://de.wikipedia.org/w/index.php?title=Spezial%3AGlobale_Benutzerliste&username=&group=steward&limit=100
       // Datrio,Fantasy: bis 22.12.2007
       // Suisui,Snowdog: bis 1.1.2008
       // Maveric149 (auf meta: Daniel Mayer): nur noch Meta-Steward, nicht Global
       // ★★★ スチュワードの一覧 ★★★
       var stewards=new Array(
        /* global stewards */
        "Andre_Engels", "Avraham", "Bastique", "Darkoneko", "DerHexer", "Dferg", "Drini", "Dungodung", "Erwin", "Guillom", "J.delanoy", "Jusjih", "Jyothis", "Kylu", "Laaknor", "Leinad", "M7", "Magister_Mathematicae", "Mardetanha", "Mav", "Melos", "Mercy", "Millosh", "Nick1915", "Pathoschild", "Rdsmith4", "Shanel", "Shizhao", "Sj", "Wutsje");

       var stewards_str = '|'+stewards.join('|')+'|';
 
       // renames
       // Geograv -> Zeuke (Account existiert noch, jedoch Zweitaccount von Admin "Rauenstein", siehe http://de.wikipedia.org/w/index.php?title=Wikipedia:Adminkandidaturen&oldid=19387794 )
       var renadmins=new Array("");
       var renadmins_str = '|'+renadmins.join('|')+'|';
 
       if (typeof(markatxt) == 'undefined')
           markatxt = "A";
       if (typeof(markbureautxt) == 'undefined')
           markbureautxt = "B";
       if (typeof(markstewtxt) == 'undefined')
           markstewtxt = "S";
       if (typeof(markrenatxt) == 'undefined')
           markrenatxt = "A-Ren";
   }
 
   if (markcomadmins) {
       // Notes: Eigntlich = Notschrei on commons
       //        Krimpet = Fran Rogers on commons
       //        Kuru = D-Kuru on commons
       //        MPF-UK = MPF on commons
       //        Fred Chess = Fred J on commons
       //        Raul654: bei uns gesperrt?! (usurped?)
       var comadmins=new Array("");
       var comadmins_str = '|'+comadmins.join('|')+'|';
 
       if (typeof(markcomatxt) == 'undefined')
           markcomatxt = "Com-A";
   }
 
   if (markexadmins) {
       /*
         Notizen zu den Ex-Admins:
          - PyBot: nur technisch Admin (2003)
          - VIBBER/Starling: Status unklar (als IW-Developer wohl Adm, 2003/2004 in Admin-Liste geführt)
          - VIBBER 20.4.07 selbst geadmint (???)
          - klar deklarierte Nachfolgeaccounts stehen auch hier (El->Jah, Robert Kropf->TheRunnerUp)
          - umbenannte Ex-Admins stehen auch hier (keine Extramarkierung für die paar Leute)
          - Legende dazu:
             Coma/Koethnig2 -> Koethnig

       */
       var exadmins=new Array("");
       var exadmins_str = '|'+exadmins.join('|')+'|';
 
       /*
         seltsame Einträge im [[Wikipedia:Bürokratenlogbuch]] (Februar 2004) scheinen
         auf E23 und TomK32 als Bürokraten hinzudeuten; hier aber nicht aufgeführt
 
         vor Februar 2004: Admin-Flag durch Developer gesetzt, deshalb Manske aufgeführt
       */
       var exbureaucrats=new Array("");
       var exbureaucrats_str = '|'+exbureaucrats.join('|')+'|';
 
       if (typeof(markexatxt) == 'undefined')
           markexatxt = "Ex-A";
       if (typeof(markexbureautxt) == 'undefined')
           markexbureautxt = "Ex-B";
   }
 
   // oversight
   if (markoversight) {
       // Notes: nö
       var oversight=new Array("");
       var oversight_str = '|'+oversight.join('|')+'|';
 
       if (typeof(markoversighttxt) == 'undefined')
           markoversighttxt = "OS";
   }
 
   // checkuser
   if (markcheckuser) {
       // Notes: nö
       // ★★★ チェックユーザーの一覧 ★★★
       var checkuser=new Array("Bellcricket", "Cassiopeia_sweet", "Chatama", "Kanjy", "Ks_aka_98", "Marine-Blue", "Vigorous_action", encodeURI("欅"), encodeURI("海獺"));
       var checkuser_str = '|'+checkuser.join('|')+'|';
 
       if (typeof(markcheckusertxt) == 'undefined')
           markcheckusertxt = "CU";
   }
 
   // Ombudspersons: Abgleich mit http://de.wikipedia.org/w/index.php?title=Spezial%3AGlobale_Benutzerliste&username=&group=Ombudsmen

   // ★★★ オンブズマンの一覧 ★★★
   var ombudsman=new Array("Elian", "Lar", "Palnatoke", "Carkuni", "DR");
   var ombudsman_str = '|'+ombudsman.join('|')+'|';
 
   if (typeof(markombudsmantxt) == 'undefined')
       markombudsmantxt = "Omb";
 
   if (markarbcom || markadmins) {
 
       if (typeof(markarbcomtxt) == 'undefined')
           markarbcomtxt = "SG";

       var arbcom=new Array("");
       var admarbcom=new Array("");
 
       var arbcom_str = '|'+arbcom.join('|')+'|';
       var admarbcom_str = '|'+admarbcom.join('|')+'|';
   }
   
   if (isSpecial || isHistory || isUserpage || isTalk || isProject || isDatei || isHelp || isDiff) {
      var i;
      var aNode;
      var allanchors = document.getElementsByTagName("A");
      var searchExp = new RegExp(".wiki.%E5%88%A9%E7%94%A8%E8%80%85.(.+)"); // encodeURI("利用者")
	  var trenn="/wiki/" + encodeURI(langUser);
      var marker;//表示されるテキストを入れる変数
      var mainpageanchor;
      var SGSpecial;
	   
      appendCSS('span.adminMark { font-weight: bold; }');//CSSを足す。追加されるテキストのスタイルをここで決める。
	  
	  
         for (i=0; i < allanchors.length; i++) {//リンクをすべてチェックする。
         aNode = allanchors[i];
         mainpageanchor = true;
         SGSpecial = false;
         // if it's a link to a user
		 
		 
         if ((href = aNode.getAttribute("href")) && (href.indexOf(trenn) != -1)) {//リンクでかつ「wiki/利用者」の形のURLを含むなら
             currUser = searchExp.exec(href)[1];//正規表現で利用者名を取得「wiki/(名前)」
             /* if (isUserpage) */ currUserClean = currUser.replace(/\/.*/,'');//スラッシュを消す?
             if (currUserClean != currUser) mainpageanchor = false;
             currUser= "|" + currUserClean + "|";// "|名前|"の形にする
             marker = new Array();
 
             if (admarbcom_str.indexOf(currUser) != -1) {
                 SGSpecial = true;
                 if (markarbcom || markadmins) marker.push(markarbcomtxt + "-" + markatxt);
             }
 
             if (markadmins && !SGSpecial) {
                // don't mark SG-only Adm twice
                if (!(admarbcom_str.indexOf(currUser) != -1)) {
                   // 管理者かどうか?is this user an admin?
                   if (admins_str.indexOf(currUser) != -1) marker.push(markatxt);
                }
                // 改名した管理者かどうか?is this user a renamed admin?
                if (renadmins_str.indexOf(currUser) != -1) marker.push(markrenatxt);
                // スチュワードかどうか?is this user a steward?
                if (stewards_str.indexOf(currUser) != -1) marker.push(markstewtxt);
                // オンブズマンかどうか?is this user an ombudsman?
                if (ombudsman_str.indexOf(currUser) != -1) marker.push(markombudsmantxt);
                // ビューロクラットかどうか?is this user a bureaucrat?
                if (bureaucrats_str.indexOf(currUser) != -1) marker.push(markbureautxt);
             }
 
             if (markoversight) {
                // オーバーサイトかどうか?does this user have oversight rights?
                if (oversight_str.indexOf(currUser) != -1) marker.push(markoversighttxt);
             }
 
             if (markcheckuser) {
                // CUかどうか?does this user have checkuser rights?
                if (checkuser_str.indexOf(currUser) != -1) marker.push(markcheckusertxt);
             }
 
             if (markarbcom && !SGSpecial) {
                // 管理者かどうか?is this user an arbcom member?
                if (arbcom_str.indexOf(currUser) != -1) marker.push(markarbcomtxt);
             }
 
             if (markcomadmins) {
                // コモンズの管理者かどうか?is this user a commons admin?
                if (comadmins_str.indexOf(currUser) != -1) marker.push(markcomatxt);
             }
 
             if (markexadmins) {
                // かつて管理者だったかどうか?was this user an admin?
                if (exadmins_str.indexOf(currUser) != -1) marker.push(markexatxt);
                // かつてビューロクラットだったかどうか?was this user a bureaucrat?
                if (exbureaucrats_str.indexOf(currUser) != -1) marker.push(markexbureautxt);
             }
 
             // don't mark certain pages, except link to user main page
             if (mainpageanchor ||
                 (marksubpages && (wgCanonicalSpecialPageName != "Prefixindex")
                               && (wgCanonicalSpecialPageName != "Allpages")) )
             // check finished, now append node
			 
			 //marker「(管)などのテキストを入れる変数」の長さがゼロより大きく、かつ自分をマークしない設定になっていて利用者が自分の時でないなら
             if ((marker.length > 0) && !(dontmarkmyself && (currUserClean == wgUserName))) {
                // Variante 1 (traditionell)
                // var aMark = document.createElement("b");
                // Variante 2 (vom Erzbschof)
                var aMark = document.createElement("span");//span要素を作成
                aMark.className = "adminMark";//クラスを設定。このクラスは上でappendCSSで追加しているもの
 
                var aMarkText = document.createTextNode(" (" + marker.join("/") + ")");//テキストをスラッシュで区切って接続し、カッコで挟む
                aMark.appendChild(aMarkText);//span要素の中にテキストを入れる
                aNode.appendChild(aMark);//span要素を<a>要素の末尾に入れる
             }
         }
      }
   }
 }
 

 addOnloadHook(markAdmins);//ページのロードが終了したら 関数 markAdmins() を呼び出す
 
//</source>