LINUX.ORG.RU

История изменений

Исправление firestarter, (текущая версия) :

Кстати, можно запилить userscript.

Запилил

// ==UserScript==
// @name        Open deleted comments
// @version     1
// @grant       none
// @include     http://www.linux.org.ru/*
// @include     https://www.linux.org.ru/*
// @author      BrainFucker aka Firestarter ( http://www.linux.org.ru/people/firestarter/profile )
// @description Open deleted comments in one click http://www.linux.org.ru/forum/linux-org-ru/9034713?cid=9037218
// ==/UserScript==

CidExp=/cid=(\d+)/;

$('s>a').click(function(event){
event.preventDefault();
var Href = $(this).attr('href');
var Hash = '';
if(Cid=CidExp.exec(Href)){
    Hash = '#comment-'+Cid[1];
}

if(Href.indexOf('?')!=-1){
    Href = Href.substring(0, Href.indexOf('?')) + Hash;
}

$('[name=deleted]').parent('form').attr({'action': Href, 'target': '_blank'}).submit();
});

Исходная версия firestarter, :

Кстати, можно запилить userscript.

Запилил

// ==UserScript==
// @name        Open deleted comments
// @version     1
// @grant       none
// @include     http://www.linux.org.ru/*
// @include     https://www.linux.org.ru/*
// @author      BrainFucker aka Firestarter ( http://www.linux.org.ru/people/firestarter/profile )
// @description Open deleted comments in one click 
// ==/UserScript==

CidExp=/cid=(\d+)/;

$('s>a').click(function(event){
event.preventDefault();
var Href = $(this).attr('href');
var Hash = '';
if(Cid=CidExp.exec(Href)){
    Hash = '#comment-'+Cid[1];
}

if(Href.indexOf('?')!=-1){
    Href = Href.substring(0, Href.indexOf('?')) + Hash;
}

$('[name=deleted]').parent('form').attr({'action': Href, 'target': '_blank'}).submit();
});