User:Frankou/racMisc.js

维基百科,自由的百科全书

注意:保存之后,你必须清除浏览器缓存才能看到做出的更改。Google ChromeFirefoxMicrosoft EdgeSafari:按住⇧ Shift键并单击工具栏的“刷新”按钮。参阅Help:绕过浏览器缓存以获取更多帮助。

//<nowiki>
//$GET
function $GET (name) {
 var matches = RegExp('[&?]' + name + '=([^&]*)').exec(document.location.href);
 if (matches) { try { return decodeURIComponent(matches[1]); } catch (expt) {}}
 return null;
}
 
var racGETType;
var racGETContent;
var racGETPosition;
var racGETSummery;
var racGETAddition;
var racGETAction;
var racGETExcludePageId;
var racGETAddToList;
var racSearchStub = false;
var racInsertLocation = false;

//racSettings
var racSettings = {
sig:'~~~'
};

var racExcludeThisPage = false;
if (!racExcludeList.include) {
alert ('Exclude list is not exist!\nIts constructor is ' + racExcludeList.constructor);
}else{
racExcludeThisPage = racExcludeList.include (wgArticleId);
}

//racTime
function racTime () {
 var now = new Date();
 return (
  now.getUTCFullYear().toPaddedString (4) + '-' +
  (now.getUTCMonth() + 1).toPaddedString (2) + '-' +
  now.getUTCDate().toPaddedString (2) + 'T' +
  now.getUTCHours().toPaddedString (2) + ':' +
  now.getUTCMinutes().toPaddedString (2) + ':' +
  now.getUTCSeconds().toPaddedString (2) + 'Z'
 );
}
//</nowiki>