您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Vereinfachte Navigation auf Hartgeld.com
当前为
// ==UserScript== // @name HG-Optimierung // @namespace hgtools // @include http://www.hartgeld.com/* // @version 1.1 // @grant none // @description Vereinfachte Navigation auf Hartgeld.com // ==/UserScript== (function () { var neu = 0; $('.tab-content a').each(function() { var value = $(this).attr('href'); $(this).attr('url', value); $(this).attr('href', 'javascript:return false;'); }); $(".tab-content a").click(function() { if (neu == 0) { $(".container-fluid").css({"position": "relative"}); $(".container-fluid").prepend('<div id="olframe" style="display:none;height:98%;width:70%;max-width:900px;position:fixed;top:0;right:0;z-index:10000;"><div style="border: 1px solid #666;opacity: 0.8;float:left;position: absolute;background:#fff;border-radius:25px;"><a id="close" style="top: 0px;left: -2px;position: relative;height:20px;width:20px;padding:6px;font-size:30px;display:block;text-decoration:none;" href="javascript:return false;">✖</a></div><iframe id="lesefenster" style="box-shadow: -10px 10px 13px -3px rgba(158,158,158,1);width:100%;height:100%;background:#fff;overflow:auto;border:none;"></iframe></div>'); $('#olframe').slideDown("normal"); } neu = 1; var url = $(this).attr("url"); MarkiertenBereichAufheben(); jQuery(this).css({"background": "#f6b400", "color": "#333", "font-weight": "bold", "padding": "2px"}); jQuery('#lesefenster').attr("src", url); }); function MarkiertenBereichAufheben() { $('.tab-content a').each(function() { $(this).css({"background": "none", "color": "#3D728C", "font-weight": "normal", "padding": "0"}); }); } $(".container-fluid").on('click', '#close', function() { $('#lesefenster').slideUp("normal", function(){ $('#olframe').remove();}); neu = 0; MarkiertenBereichAufheben(); }); if (self !== top) { jQuery('.header-fixed').css({"display": "none"}); jQuery('#top').css({"display": "none"}); jQuery('#top2').css({"display": "none"}); jQuery('#main').css({"margin-top": "10px"}); var mtext = ''; $(".artikel").prepend('<div style="display:none;box-shadow: -10px 10px 13px -3px rgba(158,158,158,1); border-radius:8px;position: absolute; text-align: center; padding: 5px 10px 10px; width: 200px; background: #f6b400; color: #333; font-weight: bold;" id="message"><a id="mailsenden" href="javascript:return false;">Neuen Kommentar zu diesem Zitat einsenden »</a></div>'); $('.artikel').mouseup(function(event) { var temp = document.getSelection().toString(); if (temp != '') { mtext = temp; $("#message").css({ top: event.pageY, left: event.pageX }).slideDown("normal"); } }); $(".artikel").mousedown(function(event) { if (event.target.id == 'mailsenden') { var seite = window.location.href.split('/'); var textauszug = Textkuerzen(mtext); window.location.href = "mailto:[email protected]?subject=Neuer Leserkommentar zu Seite " + seite[3] + "&body=Sehr geehrtes Hartgeld-Team,%0A%0Azu folgendem Eintrag auf der Seite " + seite[3] + " möchte ich gerne wie untenstehend kommentieren:%0A%0AIhr Eintrag:%0A------------------------------------------------------------%0A" + encodeURIComponent(textauszug) + "%0A------------------------------------------------------------%0A%0AMein Kommentar dazu:%0A%0A"; } SchliessePopup(); }); function SchliessePopup() { $('#message').slideUp("normal"); if (window.getSelection) { window.getSelection().removeAllRanges(); } else if (document.selection) { document.selection.empty(); } } function Textkuerzen(mtext) { if (mtext.length > 300) { var trimmedString = mtext.substr(0, 300); trimmedString = trimmedString.substr(0, Math.min(trimmedString.length, trimmedString.lastIndexOf(" "))); return trimmedString + ' [...]'; } } } }());