注意:在保存之后,您可能需要清除浏览器缓存才能看到所作出的变更的影响。
?_=1
来访问最新页面。https://mzh.moegirl.org.cn/User:%E4%B9%9D%E6%B1%9F%E6%9C%88/common.js/vector.js?_=1
/* Hitokoto version: 3.1.2 *//* eslint-disable */ "use strict"; function _classCallCheck(instance,Constructor){ if(!(instance instanceof Constructor)){ throw new TypeError("Cannot call a class as a function"); } } $.extend({ getURI:function getURI(name){ return'https://AnnAngela.github.io/MoegirlPedia-Hitokoto/'+name; }, getCode:function getCode(name,f){ return $.get($.getURI(name)+'?_='+new Date().getTime(),f); }, runCode:function runCode(name,version,type){ var isJS=type==='js', node=document.createElement(isJS?'script':'link'), url=$.getURI(name)+'?version='+version; function getLink(){ return isJS?node.src:node.href; } function setLink(l){ if(isJS)node.src=l;else node.href=l; } if(isJS)node.type="text/javascript";else node.rel="stylesheet"; setLink(url); node.addEventListener('error',function(){ if(/\d{13,}/.test(getLink()))setLink(getLink().replace(/\d{13,}/g,new Date().getTime()));else setLink(getLink()+'&_='+new Date().getTime()); }); document.body.appendChild(node); } }); $.getCode('package.json',function(_ref){ var ver=_ref.version;var _ref$Files=_ref.Files;var js=_ref$Files.js;var css=_ref$Files.css.minified; var Hitokoto=function Hitokoto(){ _classCallCheck(this,Hitokoto); var version=ver,Reflect=window.Reflect||{}; var self=this,moduleList={ js:mw.config.get('AnnTools-Hitokoto-es2015')?js.es2015:js.es5minified,css:css }; localStorage.setItem('AnnTools-Hitokoto-version',version); Object.assign(self,{ running:false, stopping:false, version:version, module:moduleList, moduleKeys:(Reflect.keys||Reflect.ownKeys||Object.keys)(moduleList), numberArray:['one','two','three','four','five','six','seven','eight','nine','ten'] }); moduleList.js.forEach(function(n){ return n.includes('timer')||n.includes('startup')||$.runCode(n,version,'js'); }); moduleList.css.forEach(function(n){ return $.runCode(n,version,'css'); }); }; window.Hitokoto=new Hitokoto(); });