Участник:OlegCinema/common.js: различия между версиями

Нет описания правки
$content.find('.tpl-permalink-reason a').attr('href', function (i, oldVal) {
var links = document.querySelectorAll('.tpl-permalink-reason a');
var usernamesusername = document.querySelectorAllquerySelector('.tpl-permalink-reason .userlink');
var label = {
"ЗСАП": encodeURIComponent("ВП:ЗСАП"),
var name = Array.from(oldVal.matchAll(regular))[0]
if (name !== undefined) {
console.log(usernames[i]username.text)
return oldVal.replace(regular, encodeURIComponent(
'[[Special:Permalink/' + (mw.config.get('wgRevisionId') + "#" + username || mw.config.get('wgCurRevisionId')) + "#" + username + '|' + decodeURIComponent(name[1]) + ']]'