“User:Irukaza/common.js”与“Template:BDSM/维基百科版”:页面之间的差异

H萌娘,万物皆可H的百科全书!
< User:Irukaza(页面间差异)
跳到导航 跳到搜索
imported>=海豚=
无编辑摘要
 
imported>=海豚=
(文本替换 - 替换“<br />”为“<br>”)
 
第1行: 第1行:
mw.loader.load('https://www.hmoegirl.com/index.php?title=User:=海豚=/js/userStatus.js&action=raw&ctype=text/javascript');
{{Navbox
"use strict";
| name = BDSM
$(() => (async () => {
| title = [[BDSM]] 概述
   await mw.loader.using(["mw.Api", "mediawiki.Uri"]);
| state = {{{state<includeonly>|collapsed</includeonly>}}}
   const groupsKey = ["bureaucrat", "checkuser", "suppress", "sysop", "patroller", "bot", "goodeditor"].reverse();
| bodyclass = hlist
   const groupsStr = {
| basestyle = text-align:center;
     bureaucrat: "行",
 
     checkuser: "查",
| group1 = 绑缚与调教<br>([[wikipedia:Bondage (BDSM)|Bondage]] and [[wikipedia:discipline (BDSM)|discipline]])<br>''B&D'' or ''B/D''
     suppress: "监",
| list1 =[[Animal roleplay]] • [[Bondage hood]] • [[Bondage suit]] • [[Breast bondage]] • [[Collar (BDSM)|Collar]] • [[Crotch rope]] • [[Erotic sexual denial]] • [[Forced orgasm]] • [[Head bondage]] • [[Human furniture]] • [[Hogtie bondage]] • [[Interrogation scene]] • [[wikipedia:Japanese bondage|日式束缚]] • [[Metal bondage]] • [[Mummification (BDSM)|Mummification]] • [[List of bondage positions|Positions]] • [[Predicament bondage]] • [[Rope bondage]] • [[Self-bondage]] • [[Sensation play]] • [[Spreadeagle (position)#Bondage activity|Spreadeagle position]] • [[Suspension bondage]] • [[Total enclosure fetishism|Total enclosure]]
     sysop: "管",
 
     patroller: "巡",
| group2 = 支配与臣服<br>([[wikipedia:Dominance_and_submission|Dominance and submission]])<br>''D&S'' or ''D/s''
     bot: "机",
| list2 =[[Ageplay]] • [[Omorashi|Bladder desperation]] • [[Body worship]] • [[Boot worship]] • [[Erotic humiliation]] • [[Facesitting]] • [[Fear play]] • [[Female dominance]] • [[Dominatrix]] • [[Female submission]] • [[Feminization (activity)|Feminization]] • [[Male dominance (BDSM)|Male dominance]] • [[Male submission]] • [[Master/slave (BDSM)|Master/slave]] • [[Medical fetishism]] • [[Rape fantasy]] • [[Servitude (BDSM)|Servitude]]
     goodeditor: "优",
 • [[Sexual slavery (BDSM)|Sexual slavery]]
   };
 
   let cache;
| group3 = 施虐与受虐<br>([[wikipedia:Sadomasochism|Sadomasochism]]) ''译为:虐恋''<br>''S&M'' or ''S/M''
   try {
| list3 =[[Breast torture]] • [[Caning]] • [[Cock and ball torture]] • [[Erotic asphyxiation]] • [[Erotic electrostimulation]] • [[Erotic spanking]] • [[Figging]] • [[Impact play]] • [[Knife play]] • [[Play piercing]] • [[Pussy torture]] • [[Temperature play]] • [[Urethral sounding]] • [[Violet wand]] • [[Wax play]] • [[Sadism and masochism in fiction|In fiction]]
     cache = JSON.parse(localStorage.getItem("AnnTools-usergroup"));
 
     if (!$.isPlainObject(cache)
| group4 = 相关话题
       || typeof cache.timestamp !== "number" || cache.timestamp < new Date().getTime() - 30 * 60 * 1000
| list4 =[[Consent (BDSM)|Consent]] • [[Dungeon monitor]] • [[Edgeplay]] • [[Gorean subculture]] • [[wikipedia:International Fetish Day|国际恋物癖日]] • [[Kink (sexuality)|Kink]] • [[Leather subculture|Leathermen]] • [[Leather Pride flag]] • [[Limits (BDSM)|Limits]] • [[Munch (BDSM)|Munch]] • [[Pegging (sexual practice)|Pegging]] • [[Play (BDSM)|Play]] • [[Play party (BDSM)|Play party]] • [[Risk-aware consensual kink]] • [[Safe, sane and consensual]] • [[Safeword]] • [[Sexual fetishism]] • [[Sexual roleplay]] • [[Top, bottom, switch (BDSM)|Top, bottom, switch]]
       || !$.isPlainObject(cache.groups)) {
 
       throw new Error();
| group5 = 杂项
     } else {
| list5 =[[FetLife]]
       for (const i of groupsKey) {
 
         if (!Array.isArray(cache.groups[i])) {
| below =[[wikipedia:BDSM in culture and media|'''文化和媒体''']] • [[wikipedia:List of BDSM equipment|'''道具''']] • [[wikipedia:Glossary of BDSM|'''英语术语''']] • [[wikipedia:BDSM and the law|'''相关法律''']]
           throw new Error();
 
         }
}}<noinclude>
       }
[[分类: 导航模板]]
     }
</noinclude>
   } catch {
     const api = new mw.Api();
     const result = {};
     const eol = Symbol();
     let aufrom = undefined;
     while (aufrom !== eol) {
       const _result = await api.post({
         action: "query",
         list: "allusers",
         augroup: groupsKey.join("|"),
         aulimit: "max",
         auprop: "groups",
         aufrom,
       });
       if (_result.continue) {
         aufrom = _result.continue.aufrom;
       } else {
         aufrom = eol;
       }
       _result.query.allusers.forEach(({
         name,
         groups,
       }) => {
         groups.forEach((group) => {
           if (groupsKey.includes(group)) {
             result[group] = result[group] || [];
             if (!result[group].includes(name)) {
               result[group].push(name);
             }
           }
         });
       });
     }
     cache = {
       timestamp: new Date().getTime(),
       groups: result,
     };
   }
   localStorage.setItem("AnnTools-usergroup", JSON.stringify(cache));
   const hook = () => {
     $("a.mw-userlink:not(.markrights)").each((_, ele) => {
       ele.classList.add("markrights");
       const uri = new mw.Uri(ele.href);
       let username;
       const path = decodeURI(uri.path);
       if (/^\/User:[^/=%]+/.test(path)) {
         username = path.match(/^\/User:([^/=%]+)/)[1].replace(/_/g, " ");
       } else if (/^User:[^/=%]+/.test(uri.query.title)) {
         username = uri.query.title.match(/^User:([^/=%]+)/)[1].replace(/_/g, " ");
       }
       if (username) {
         const self = $(ele);
         groupsKey.forEach((group) => {
           if (cache.groups[group].includes(username)) {
             self.after(`<sup class="markrights-${group}">${groupsStr[group]}<sup>`);
           }
         });
       }
     });
     for (const group of Object.keys(groupsStr)) {
       $(`.markrights-${group}`).nextUntil(':not([class*="markrights-"])').filter(`.markrights-${group}`).remove();
     }
   };
   hook();
   mw.hook("wikipage.content").add(hook);
   $(window).on("load", hook);
   $("body").append("<style>.markrights-bureaucrat{color:black}.markrights-checkuser{color:purple}.markrights-suppress{color:purple}.markrights-sysop{color:mediumvioletred}.markrights-patroller{color:sienna}.markrights-bot{color:blue}.markrights-goodeditor{color:green}sup[class^=markrights-]+sup[class^=markrights-]{margin-left:2px}</style>");
})());

2020年6月11日 (四) 15:40的版本