您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds download buttons to subtitles list (in search).
// ==UserScript== // @name Podnapisi.net Download Buttons // @author NuJumala <[email protected]> // @namespace www.podnapisi.net // @grant none // @include http://*.podnapisi.net/*/search* // @description Adds download buttons to subtitles list (in search). // @version 1.7.0 // ==/UserScript== $ = unsafeWindow.jQuery; if ($ == null) { return; } $('#ppodnapisiFps').parent().before('<th class="posts">DL</th>'); $('.list_div2 a').each(function(index, element) { href = $(element).attr('href'); matches = href.match(/.*-p(.*)/); if(matches) { id = 'dl-'+matches[1]; button = '<td id="'+id+'" align="center"><a rel="'+href+'"><img vspace="5" hspace="5" alt="Podnapisi" src="http://static2.podnapisi.net/images/nextgen/podnapisi/download.gif" class = "slikevvrsti"></a></td>'; $(element).parents().eq(1).children().eq(0).hide(); $(element).parents().eq(2).children().eq(0).after(button); $('#'+id).click(function() { $.ajax({ url: $('a', this).attr('rel'), beforeSend: function(xhr) { xhr.setRequestHeader('X-Requested-With', {toString: function(){ return ''; }}); }, dataFilter: function(data) { return data; } }).done(function(data) { $.ajax({ url: $('.#subtitle .footer a', data).attr('href'), beforeSend: function(xhr) { xhr.setRequestHeader('X-Requested-With', {toString: function(){ return ''; }}); }, dataFilter: function(data) { return data; } }).done(function(data) { matches = data.match(/(\/hr\/ppodnapisi\/download.*?)'/m); window.location.href = matches[1]; }); }); }); } }); // EOF