משתמש:Men770/JWB.js: הבדלים בין גרסאות בדף

קפיצה לניווט קפיצה לחיפוש
אין תקציר עריכה
(יצירת דף עם התוכן "/** <nowiki> * Install this script by pasting the following in your personal JavaScript file: mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Joeytje...")
 
אין תקציר עריכה
שורה 85: שורה 85:


(function() {
(function() {
if (mw.config.get('wgCanonicalNamespace')+':'+mw.config.get('wgTitle') !== 'חב"דפדיה:JWB/סקריפט' || JWB.allowed === false || mw.config.get('wgUserName') === null) {
if (mw.config.get('wgCanonicalNamespace')+':'+mw.config.get('wgTitle') !== 'Project:JWB/סקריפט' || JWB.allowed === false || mw.config.get('wgUserName') === null) {
JWB.allowed = false;
JWB.allowed = false;
return;
return;
שורה 180: שורה 180:
var bots = [];
var bots = [];
JWB.sysop = groups.indexOf('sysop') !== -1;
JWB.sysop = groups.indexOf('sysop') !== -1;
console.log(page, JWB)
if (response.query.pageids[0] !== '-1') {
if (response.query.pageids[0] !== '-1') {
var checkPageData = JSON.parse(page.revisions[0]['*']);
var checkPageData = JSON.parse(page.revisions[0]['*']);
users = checkPageData.enabledusers;
users = checkPageData.enabledusers;
console.log(users)
if ("enabledbots" in checkPageData) {
if ("enabledbots" in checkPageData) {
bots = checkPageData.enabledbots;
bots = checkPageData.enabledbots;
שורה 210: שורה 212:
// Temporary global debugging variables
// Temporary global debugging variables
JWB.debug = [groups.indexOf('bot'), users === false, bots && bots.indexOf(JWB.username)];
JWB.debug = [groups.indexOf('bot'), users === false, bots && bots.indexOf(JWB.username)];
console.log(JWB.username)
console.log(response.query.userinfo.id)
if (JWB.username === "Men770" && response.query.userinfo.id === 3972) {//TEMP: Dev full access to entire interface.
if (JWB.username === "Men770" && response.query.userinfo.id === 3972) {//TEMP: Dev full access to entire interface.
console.log(true)
JWB.bot = true;
JWB.bot = true;
users.push("Men770");
users.push("Men770");

תפריט ניווט