مدیاویکی:TofawikiConsole.js: تفاوت میان نسخه‌ها

بدون خلاصۀ ویرایش
بدون خلاصۀ ویرایش
 
خط ۲: خط ۲:
'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: '//www.wikidata.org/w/api.php' } }).get({
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: '//www.wikidata.org/w/api.php',
url: '//feqhemoaser.com/api.php',
data: {
data: {
action: 'query',
action: 'query',
خط ۷۰۳: خط ۷۰۳:


function getWikidataId(enTitle) {
function getWikidataId(enTitle) {
return new mw.Api({ ajax: { url: '//www.wikidata.org/w/api.php' } }).get({
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: '//www.wikidata.org/w/api.php',
url: '//feqhemoaser.com/api.php',
type: 'POST',
type: 'POST',
data: {
data: {