您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Verbessert die Darstellung und Verwendung der Favoriten
当前为
// ==UserScript== // @name mods.de Forum - Bessere Favoriten // @description Verbessert die Darstellung und Verwendung der Favoriten // @author TheRealHawk // @namespace http://forum.mods.de // @match http://forum.mods.de/bb/ // @match http://forum.mods.de/bb/index.php // @match http://forum.mods.de/bb/thread.php* // @icon https://i.imgur.com/wwA18B8.png // @version 1.0 // @grant GM_addStyle // @grant GM_getResourceURL // @grant GM_getResourceText // @require https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js // @require https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js // @require https://greasyfork.org/scripts/5844-tablesorter/code/TableSorter.js // @resource jQueryUICSS https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/eggplant/jquery-ui.min.css // @resource ui-bg_flat_0_eeeeee_40x100.png https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/eggplant/images/ui-bg_flat_0_eeeeee_40x100.png // @resource ui-bg_gloss-wave_30_3d3644_500x100.png https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/eggplant/images/ui-bg_gloss-wave_30_3d3644_500x100.png // @resource ui-bg_highlight-soft_100_dcd9de_1x100.png https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/eggplant/images/ui-bg_highlight-soft_100_dcd9de_1x100.png // @resource ui-bg_highlight-soft_100_eae6ea_1x100.png https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/eggplant/images/ui-bg_highlight-soft_100_eae6ea_1x100.png // @resource ui-bg_highlight-soft_25_30273a_1x100.png https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/eggplant/images/ui-bg_highlight-soft_25_30273a_1x100.png // @resource ui-bg_highlight-soft_45_5f5964_1x100.png https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/eggplant/images/ui-bg_highlight-soft_45_5f5964_1x100.png // @resource ui-icons_454545_256x240.png https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/eggplant/images/ui-icons_454545_256x240.png // @resource ui-icons_734d99_256x240.png https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/eggplant/images/ui-icons_734d99_256x240.png // @resource ui-icons_8d78a5_256x240.png https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/eggplant/images/ui-icons_8d78a5_256x240.png // @resource ui-icons_ffffff_256x240.png https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/eggplant/images/ui-icons_ffffff_256x240.png // ==/UserScript== (function(){ var resources = { 'ui-bg_flat_0_eeeeee_40x100.png': GM_getResourceURL('ui-bg_flat_0_eeeeee_40x100.png'), 'ui-bg_gloss-wave_30_3d3644_500x100.png': GM_getResourceURL('ui-bg_gloss-wave_30_3d3644_500x100.png'), 'ui-bg_highlight-soft_100_dcd9de_1x100.png': GM_getResourceURL('ui-bg_highlight-soft_100_dcd9de_1x100.png'), 'ui-bg_highlight-soft_100_eae6ea_1x100.png': GM_getResourceURL('ui-bg_highlight-soft_100_eae6ea_1x100.png'), 'ui-bg_highlight-soft_25_30273a_1x100.png': GM_getResourceURL('ui-bg_highlight-soft_25_30273a_1x100.png'), 'ui-bg_highlight-soft_45_5f5964_1x100.png': GM_getResourceURL('ui-bg_highlight-soft_45_5f5964_1x100.png'), 'ui-icons_454545_256x240.png': GM_getResourceURL('ui-icons_454545_256x240.png'), 'ui-icons_734d99_256x240.png': GM_getResourceURL('ui-icons_734d99_256x240.png'), 'ui-icons_8d78a5_256x240.png': GM_getResourceURL('ui-icons_8d78a5_256x240.png'), 'ui-icons_ffffff_256x240.png': GM_getResourceURL('ui-icons_ffffff_256x240.png') }; var jQueryUICSS = GM_getResourceText('jQueryUICSS'); $.each(resources, function(resourceName, resourceUrl) { jQueryUICSS = jQueryUICSS.replace('images/' + resourceName, resourceUrl); }); GM_addStyle(jQueryUICSS); })(); unsafeWindow.setBookmarkNew = function(pid, token){ async_get( 'async/set-bookmark.php?PID='+pid+'&token='+token, null, function(xml){ var message = ''; switch(parseInt(xml.responseText)){ case 1: message = 'Lesezeichen gesetzt.'; break; case 2: message = 'Du hast bereits zu viele Lesezeichen!'; break; default: message = 'Unbekannter Fehler:<br>' + xml.responseText; break; } $('body').append('<div id="overlayDialog">' + message + '</div>'); $('#overlayDialog').dialog({ draggable: false, resizable: false, modal: true, title: 'Lesezeichen', buttons: { Ok: function(){ $(this).dialog('close'); } }, position: {my: "right top", at: "right top", of: window} }); }); return; } $('a[href^="javascript:setBookmark"]').each(function(){ this.href = this.href.replace(/^javascript:setBookmark/, "javascript:setBookmarkNew"); }); $('#bookmarklist > table').prepend('<thead><tr><th></th><th></th><th></th><th></th><th></th><th></th><th style="display:none"></th></tr></thead>'); $('#bookmarklist > table > tbody > tr').each(function(){ if ($('td:nth-child(4)', this).text().indexOf('neu') != -1){ $(this).append('<td style="display:none">0</td>'); } else if ($('td:nth-child(3)', this).has('del').length){ $(this).append('<td style="display:none">2</td>'); } else { $(this).append('<td style="display:none">1</td>'); } }); $('#bookmarklist > table').tablesorter({sortList: [[6,0],[1,1],[2,0]]}); $('#bookmarklist > table').css('border-collapse', 'collapse'); $('#bookmarklist > table > tbody > tr').css('border-bottom', '2px solid transparent'); $('#bookmarklist > table > tbody > tr:even').addClass('color3b'); $('#bookmarklist > table > tbody > tr > td > a').css('color', '#ccc');