مدیاویکی:TofawikiConsole.js: تفاوت میان نسخهها
Nazarzadeh (بحث | مشارکتها) بدون خلاصۀ ویرایش |
Nazarzadeh (بحث | مشارکتها) بدون خلاصۀ ویرایش |
||
خط ۲: | خط ۲: | ||
'use strict'; | 'use strict'; | ||
document.title = ' | document.title = 'تغییر مسیر ساز فقه معاصر'; | ||
if (mw.config.get('wgCanonicalSpecialPageName') !== 'Blankpage' || | if (mw.config.get('wgCanonicalSpecialPageName') !== 'Blankpage' || | ||
خط ۲۴: | خط ۲۴: | ||
var methods = { | var methods = { | ||
city: { | /* city: { | ||
title: 'شهر و مکانهای مسکونی', | title: 'شهر و مکانهای مسکونی', | ||
summary: 'Rezabot', | summary: 'Rezabot', | ||
خط ۶۲: | خط ۶۲: | ||
enableCheckButton: true, | enableCheckButton: true, | ||
enableFirstAidsButton: true | enableFirstAidsButton: true | ||
}, | }, */ | ||
redirect: { | redirect: { | ||
خط ۱۳۸: | خط ۱۳۸: | ||
}, | }, | ||
category: { | /* category: { | ||
title: 'رده', | title: 'رده', | ||
summary: 'فهرست ورودی', | summary: 'فهرست ورودی', | ||
خط ۲۳۸: | خط ۲۳۸: | ||
enableCheckButton: true, | enableCheckButton: true, | ||
enableFirstAidsButton: true | enableFirstAidsButton: true | ||
} | } */ | ||
}; | }; | ||
خط ۲۵۵: | خط ۲۵۵: | ||
// ابزارهای رده | // ابزارهای رده | ||
function catParents(title) { | /* function catParents(title) { | ||
return new mw.Api({ ajax: { url: '//en.wikipedia.org/w/api.php' } }).get({ | return new mw.Api({ ajax: { url: '//en.wikipedia.org/w/api.php' } }).get({ | ||
action: 'query', | action: 'query', | ||
خط ۲۷۰: | خط ۲۷۰: | ||
function getWikidataEntity(entitle) { | function getWikidataEntity(entitle) { | ||
return new mw.Api({ ajax: { url: '// | return new mw.Api({ ajax: { url: '//feqhemoaser.com/api.php' } }).get({ | ||
action: 'wbgetentities', | action: 'wbgetentities', | ||
format: 'json', | format: 'json', | ||
خط ۲۹۸: | خط ۲۹۸: | ||
} | } | ||
//// | //// | ||
*/ | |||
$('#content').empty().append($('<div>', { id: 'tofawiki-console' }).css({ | $('#content').empty().append($('<div>', { id: 'tofawiki-console' }).css({ | ||
border: '2px solid #b3000b', | border: '2px solid #b3000b', | ||
خط ۶۸۲: | خط ۶۸۲: | ||
return $.ajax({ | return $.ajax({ | ||
url: '// | url: '//feqhemoaser.com/api.php', | ||
data: { | data: { | ||
action: 'query', | action: 'query', | ||
خط ۷۰۳: | خط ۷۰۳: | ||
function getWikidataId(enTitle) { | function getWikidataId(enTitle) { | ||
return new mw.Api({ ajax: { url: '// | return new mw.Api({ ajax: { url: '//feqhemoaser.com/api.php' } }).get({ | ||
action: 'wbgetentities', | action: 'wbgetentities', | ||
format: 'json', | format: 'json', | ||
خط ۷۱۷: | خط ۷۱۷: | ||
function addWikidataSitelink(token, wikidataId, title, site) { | function addWikidataSitelink(token, wikidataId, title, site) { | ||
return $.ajax({ | return $.ajax({ | ||
url: '// | url: '//feqhemoaser.com/api.php', | ||
type: 'POST', | type: 'POST', | ||
data: { | data: { |