Участник:Ll0l00l/gadget-ranking.js
Перейти к навигации
Перейти к поиску
// -- User:ll0l00l
// ver 1
function rank0_n_go_next()
{
var str0 = new String('');
var str1 = new String('');
str0 = document.URL.match(/ranking=\d+a\d+b\d+c\d+d\d+e\d+f/i);
var str6 = new String(str0);
str1 = str6.match(/\d+a\d+b\d+c\d+d\d+e\d+f/i);
var str7 = new String(str1);
str1 = str7.replace(/a\d+b\d+c\d+d\d+e\d+f/i,'');
var n = parseInt(str1,10);
n++;
var str7 = new String(str0);
var str8 = 'http://ru.wikipedia.org/wiki/%D0%A1%D0%BB%D1%83%D0%B6%D0%B5%D0%B1%D0%BD%D0%B0%D1%8F:Random?ranking='+ n.toString() + str7.match(/a\d+b\d+c\d+d\d+e\d+f/i);
window.location.assign(str8);
return;
};
function rank1_n_go_next()
{
var str0 = new String('');
var str1 = new String('');
str0 = document.URL.match(/ranking=\d+a\d+b\d+c\d+d\d+e\d+f/i);
var str6 = new String(str0);
str1 = str6.match(/\d+a\d+/i);
var str7 = new String(str1);
str1 = str7.replace(/\d+a/i,'');
var n = parseInt(str1,10);
n++;
var str7 = new String(str0);
var str9 = new String(str0);
var str8 = 'http://ru.wikipedia.org/wiki/%D0%A1%D0%BB%D1%83%D0%B6%D0%B5%D0%B1%D0%BD%D0%B0%D1%8F:Random?ranking=' + str9.match(/\d+a/i)+ n.toString() +str7.match(/b\d+c\d+d\d+e\d+f/i);
window.location.assign(str8);
return;
};
function rank2_n_go_next()
{
var str0 = new String('');
var str1 = new String('');
str0 = document.URL.match(/ranking=\d+a\d+b\d+c\d+d\d+e\d+f/i);
var str6 = new String(str0);
str1 = str6.match(/\d+a\d+b\d+/i);
var str7 = new String(str1);
str1 = str7.replace(/\d+a\d+b/i,'');
var n = parseInt(str1,10);
n++;
var str7 = new String(str0);
var str9 = new String(str0);
var str8 = 'http://ru.wikipedia.org/wiki/%D0%A1%D0%BB%D1%83%D0%B6%D0%B5%D0%B1%D0%BD%D0%B0%D1%8F:Random?ranking=' + str9.match(/\d+a\d+b/i)+ n.toString() +str7.match(/c\d+d\d+e\d+f/i);
window.location.assign(str8);
return;
};
function rank3_n_go_next()
{
var str0 = new String('');
var str1 = new String('');
str0 = document.URL.match(/ranking=\d+a\d+b\d+c\d+d\d+e\d+f/i);
var str6 = new String(str0);
str1 = str6.match(/\d+a\d+b\d+c\d+/i);
var str7 = new String(str1);
str1 = str7.replace(/\d+a\d+b\d+c/i,'');
var n = parseInt(str1,10);
n++;
var str7 = new String(str0);
var str9 = new String(str0);
var str8 = 'http://ru.wikipedia.org/wiki/%D0%A1%D0%BB%D1%83%D0%B6%D0%B5%D0%B1%D0%BD%D0%B0%D1%8F:Random?ranking=' + str9.match(/\d+a\d+b\d+c/i)+ n.toString() +str7.match(/d\d+e\d+f/i);
window.location.assign(str8);
return;
};
function rank4_n_go_next()
{
var str0 = new String('');
var str1 = new String('');
str0 = document.URL.match(/ranking=\d+a\d+b\d+c\d+d\d+e\d+f/i);
var str6 = new String(str0);
str1 = str6.match(/\d+a\d+b\d+c\d+d\d+/i);
var str7 = new String(str1);
str1 = str7.replace(/\d+a\d+b\d+c\d+d/i,'');
var n = parseInt(str1,10);
n++;
var str7 = new String(str0);
var str9 = new String(str0);
var str8 = 'http://ru.wikipedia.org/wiki/%D0%A1%D0%BB%D1%83%D0%B6%D0%B5%D0%B1%D0%BD%D0%B0%D1%8F:Random?ranking=' + str9.match(/\d+a\d+b\d+c\d+d/i)+ n.toString() +str7.match(/e\d+f/i);
window.location.assign(str8);
return;
};
function rank5_n_go_next()
{
var str0 = new String('');
var str1 = new String('');
str0 = document.URL.match(/ranking=\d+a\d+b\d+c\d+d\d+e\d+f/i);
var str6 = new String(str0);
str1 = str6.match(/\d+a\d+b\d+c\d+d\d+e\d+/i);
var str7 = new String(str1);
str1 = str7.replace(/\d+a\d+b\d+c\d+d\d+e/i,'');
var n = parseInt(str1,10);
n++;
var str7 = new String(str0);
var str9 = new String(str0);
var str8 = 'http://ru.wikipedia.org/wiki/%D0%A1%D0%BB%D1%83%D0%B6%D0%B5%D0%B1%D0%BD%D0%B0%D1%8F:Random?ranking=' + str9.match(/\d+a\d+b\d+c\d+d\d+e/i)+ n.toString() +'f';
window.location.assign(str8);
return;
};
function nonrank_n_go_next()
{
window.location.assign('http://ru.wikipedia.org/wiki/%D0%A1%D0%BB%D1%83%D0%B6%D0%B5%D0%B1%D0%BD%D0%B0%D1%8F:Random?'+document.URL.match(/ranking=\d+a\d+b\d+c\d+d\d+e\d+f/i));
return;
};
function buffrank()
{
var str0 = new String('');
var str1 = new String('');
str0 = document.URL.match(/ranking=\d+a\d+b\d+c\d+d\d+e\d+f/i);
var str6 = new String(str0);
str1 = str6.match(/\d+a\d+b\d+c\d+d\d+e\d+/i);
var str7 = new String(str1);
str7 = str7.replace(/[a-f]/gi,'|');
alert('{{Запись опроса|'+str7+'|~~'+'~~}}\n');
return;
};
$(function() {
var el = document.getElementById('n-randompage');
if (!el) return; //
var innerHTMLtmp = el.innerHTML;
innerHTMLtmp = innerHTMLtmp.replace('/wiki/%D0%A1%D0%BB%D1%83%D0%B6%D0%B5%D0%B1%D0%BD%D0%B0%D1%8F:Random','/wiki/%D0%A1%D0%BB%D1%83%D0%B6%D0%B5%D0%B1%D0%BD%D0%B0%D1%8F:Random?ranking=0a0b0c0d0e0f');
el.innerHTML = innerHTMLtmp;
if ( mw.config.get('wgNamespaceNumber') != 0 ) return;
if (document.URL.match(/(\?|&)ranking=\d+a\d+b\d+c\d+d\d+e\d+f/i))
{
var els = document.getElementById('column-one');
var innerHTMLtmp2 = els.innerHTML;
innerHTMLtmp2 = innerHTMLtmp2.replace('<div id="p-search" class="portlet">',
'<div id="gadget-ranking-form3" class="portlet"><h5>Оценки</h5><div class="pBody"><ul>'+
'<li><a href="#" onclick="rank0_n_go_next()">недопустимая</a></li>'+
'<li><a href="#" onclick="rank1_n_go_next()">недостаб</a></li>'+
'<li><a href="#" onclick="rank2_n_go_next()">стаб,не более</a></li>'+
'<li><a href="#" onclick="rank3_n_go_next()">недораскрытая</a></li>'+
'<li><a href="#" onclick="rank4_n_go_next()">полноценная</a></li>'+
'<li><a href="#" onclick="rank5_n_go_next()">качественная</a></li>'+
'<li><a href="#" onclick="nonrank_n_go_next()">пропустить</a></li>'+
'<li><a href="#" onclick="buffrank()">шаблон</a></li>'+
'</ul></div></div>'+
'<div id="p-search" class="portlet">');
els.innerHTML = innerHTMLtmp2;
}
return;
});