您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
MyDealz Enstyler enhanced features
当前为
// ==UserScript== // @name Enstyler // @namespace dealz.rrr.de // @description MyDealz Enstyler enhanced features // @author gnadelwartz // @license LGPL-3.0; http://www.gnu.org/licenses/lgpl-3.0.txt // @include https://nl.pepper.com/* // @include https://www.preisjaeger.at/* // @include https://www.mydealz.de/* // @include https://www.hotukdeals.com/* // @include https://userstyles.org/styles/128262/* // @include https://www.amazon.*/gp/aw/* // @version 4.00.114 // @grant GM_getValue // @grant GM_setValue // @grant GM_xmlhttpRequest // @require https://unpkg.com/umbrellajs // @require https://cdn.rawgit.com/gnadelwartz/GM_config/3bfccb1cb4238694566ec491ee83d8df94da18d5/GM_config-min.js // @require https://cdn.rawgit.com/gnadelwartz/Enstyler/0f9712b759d8312b93e864a09e71d93fb89ba75e/translations.js // @require https://cdn.rawgit.com/pieroxy/lz-string/c58a22021000ac2d99377cc0bf9ac193a12563c5/libs/lz-string.min.js // @require https://cdn.rawgit.com/gnadelwartz/sjcl/20de886688dcabda2da1a42cd89790aacc987b09/sjcl.js // @run-at document-start // @noframes // ==/UserScript== // @ the original development source with comments can be found here: https://greasyfork.org/de/scripts/24244-enstylerjs-develop // @ if you don't trust this minimized script use the development source. function e() { var e, n, a, i, o, r, l, c, s, d; ae = R(Oe), (ie || oe || re || le || ue) && u("article").not(".enClassActionDone, ." + Le).each(function(p) { u(p).addClass("enClassActionDone"), u(p).hasClass("threadWidget--type-card--item") || (null !== u(p).attr("id") ? (d = "c" != u(p).attr("id")[0], re && u(p).find(".userHtml").each(function(e) { u(e).html(u(e).html().replace(/[^ -~Ä-Ÿ✘►○●✰€]+|( )+|(\n\r)+|<\/p>|<div>/g, " ").replace(/<\/div>/g, "<br>").replace(/<p>|<br>( *<br>)+/g, "<br><br>").replace(/(<li>)(<br>)+|<br>*(<br><\/li>)/g, "$1")); }), ue && d && (a = u(p).find(".thread-price.text--b")).length && ((o = u(p).find(".cept-dealBtn")).hasClass("ico--type-redirect-white") ? o.html(a.html()) : o.html(a.html() + '<span class="ico ico--type-redirect-white size--all-xl space--l-1"></span>'), u(p).find(".cept-tb").html(a.html())), n = u(p).find(".userHtml").first(), e = u(p).find(".cept-comment-link"), a = u(p).find(".thread-title a"), s = a.length, d && !n.length && se && u(p).find(".threadGrid-image, .threadGrid-body").remove(), ie && d && (s || (a = u(p).find(".thread-title"), kt = 20), (r = u(p).find(".vote-temp")).length && (r = parseInt(r.text()), le && (c = u(p).find(".vote-temp").attr("class").replace(/.*charcoal|.*vote-temp--/i, ""), 0 > (l = r / (ce / 70) + 5) && (l *= -3), u(p).prepend('<div class="votebar vote-progress voteBar--' + c + '" style="width: ' + l + '%;"></div>'), u(p).hasClass("thread--type-card") && (r = 0), r > ce / 2.51 ? u(p).prepend(me) : -ce / 10.1 > r && u(p).prepend(be))), s ? (u(p).find("button.meta-ribbon-btn.hide--fromW3").remove(), u(p).find("span.meta-ribbon.hide--toW3").removeClass("hide--toW3"), u(p).find(".threadGrid-title .thread-title.lineClamp--2").removeClass("lineClamp--2"), i = a.first().outerHTML.replace(/\n|\r|\t/g, "").replace(/^.*href="/, "").replace(/".*/, ""), o = t(u(this), a.text(), i, ve), e.append(o)) : (ne && u(p).find("a.btn--twitter").length && (o = u(p).find("a.btn--twitter").first().outerHTML.replace(/&text=/g, "?ID=" + ae + "&text="), u(p).find("a.btn--twitter").replace(o), o = u(p).find("a.btn--facebook").first().outerHTML.replace(/&title=/g, "?ID=" + ae + "&title="), u(p).find("a.btn--facebook").replace(o), o = u(p).find("a.btn--whatsapp").first().outerHTML.replace(/" rel="no/, "?ID=" + ae + '" rel="no'), u(p).find("a.btn--whatsapp").replace(o)), o = t(u(this), a.text(), "" + I, te), u(p).find("a.btn--twitter").parent().append(o))), d && (o = u(p).find(".threadGrid-image, .threadCardLayout--row--image")).length && o.html(o.html().replace(/ img--dummy.*" data-lazy-img="{"src":"/, '" src="').replace(/","finishClass":.*">/, '">'))) : u(p).remove()); }); } function t(e, t, n, a) { 100 > (t = encodeURIComponent(("Gnadelwartz" == Y ? "KayDealz" : V) + ": " + t.replace(/\r|\n|\t/g, " ").replace(/ */g, " "))).length && e.find("span.thread-price").length && (t += encodeURIComponent(" -> " + e.find("span.thread-price").text().replace(/ |\t/g, ""))); var i = n; return ne && (i = n.replace(/^https:\/\/.*?\//, "https://dealz.rrr.de/" + V + "/") + "?ID=" + ae), a.replace(Je[Ue], "\n\r" + n).replace(Je[Ke], function(e, t, n) { return void 0 === n && (n = " "), e.length > 160 ? (e = e.substr(0, 159)).substr(0, e.lastIndexOf(n)) + "..." : e; }(t, 0, "%20") + "&body=" + t + "%0D%0A%0D%0A" + i + Me); } function n() { if (we != U) { var e, t, n; u("article").not("." + Ne + ", .threadWidget-item").each(function(a) { u(a).addClass(Ne), (t = u(a).attr("id")) ? t.startsWith("thread_details") || ("c" != t ? (e = (u(a).find(".thread-title a").text() + " @" + u(a).find("a.user").text()).replace(/\n|\r|\t+/g, " "), n = null !== (n = u(a).find(".vote-temp")).text() ? parseInt(n.text()) : 0) : (e = (u(a).find(".userHtml").text() + " @" + u(this).find("a.user").text()).replace(/\n|\r|\t+/g, ""), n = 0), e = e.replace(De[1], " "), xe && e.match(_e) || (we >= n || ke && e.match(Ge)) && (u(a).addClass(Le), Se++, function(e) { e == "#" + GM_getValue(Ve, "") && (GM_setValue(Ve, Pe), Pe = u(e).first().nextElementSibling.getAttribute(Xe), r()); }("#" + u(a).attr(Xe)))) : u(a).remove(); }), a(); } } function a() { ut.default.enCUnblackL.label = st.replace(Je[Ke], Se); } function i() { Se = 0, a(), u("." + Le).removeClass(Le); } function o() { if (GM_config.get("enCDealT")) { var e, t, n, a = Date.now(); u(".meta-ribbon, time, .metaRibbon").not("." + He).each(function(i) { if (u(i).addClass(He), !(e = u(i).html()).includes(" am ")) { switch (qe.setTime(a - (60 * parseInt(e.replace(/.* ([0-9].*) [hu].*|.*/, "$1")) + parseInt(e.replace(/.* ([0-9].*) m.*|.*/, "$1"))) * j), t = (a - qe) / j, n = ("" + qe).slice(16, 21), !0) { case 5 > n.length || 60 > t: return; case t > 1440: e += " (" + n + Ie + ")"; break; case Ae > qe: e = Te + n + Ie; break; default: e += " (" + Be + n + Ie + ")"; } u(i).html(e); } }); } } function r() { "" != Ve && (GM_setValue("enLastCheck" + Ve, Date.now() / $), Pe ? (GM_setValue(Ve + "Last", Pe), u("#" + Pe).addClass("enClassMarkArticle"), $e.startsWith("thread_") && u("#" + $e).addClass("enClassMarkArticleLoad")) : GM_setValue(Ve, "thread_1")); } function l() { var e = Date.now() / $ - GM_getValue("enLastUpdateCheck", "0"); (e > P || 0 > e) && function() { var e = parseInt(Date.now() / $), t = function() { var e = GM_getValue(Ye, ""); if ("" == e || !e.startsWith("#")) return ""; var t = (e = e.replace(/\n/g, "")).split(";"); e = ""; for (var n = 0; n < t.length; n++) if ("" != t[n]) { var a = t[n].split(":"); 2 > a.length || (e += "&" + a[1].slice(0, -1) + "=" + a[1]); } return e = "?" + e.slice(1); }(); (/* curreently we assume its a CSS or JS File, so we strip comments and @namespace @moz-document... */ function(e, t) { GM_xmlhttpRequest({ method: "GET", url: e, onload: function(e) { var n = e.responseText.replace(/\r\n/g, " ").replace(/\/\*.*?\*\/| *|\t/g, "").replace(/([:;]) /g, "$1").replace(/1111.11%/g, "100%"); GM_setValue(t, n), L(n); }, onerror: function() { alert(d("cssfailed")); } }); })(je + t, Oe), GM_setValue("enLastUpdateCheck", e), b(); }(); } function c(e, t, n, a, i) { void 0 !== i && "" != i || (i = ot); var o = !1, r = Qe[e].replace(Je[Xe], a).replace(Je[Ke], t); i != ot && (r = r.split(ot).join("--type-" + i)), "function" == typeof n ? o = !0 : r = r.replace(Je[Ue], n), "M" == e[0] && ("" == rt && u(".nav-link.navMenu-trigger").on("click", function() { setTimeout(s, 200); }), rt += r, o && (lt[ct++] = { ID: a, target: n })); } function s() { u(".popover-content nav .navMenu-div").first().insertAdjacentHTML("beforebegin", T(rt, enMenuLang, fe)); var e = u(".popover--mainNav"), t = 35 * (rt.split(Ze).length - 1) + parseInt(e.attr("style").split("height: ")[1]); e.attr("style", e.attr("style").replace(/height: [0-9.]*px/, "height: " + t + "px")); for (var n = 0; ct > n; n++) u("section #" + lt[n].ID).on("click", lt[n].target); } function d(e) { return T("<EN-LANG:" + e + ">", enConfigLang, fe); } function p(e) { return T("<EN-LANG:" + e + ">", enMessageLang, fe); } function f() { u("body").prepend('<div id="enOverDim"></div>'), GM_config.open(), document.getElementById("main").click(), ft = !0; } function g() { u("#enOverDim").remove(), ft = !1; } function h() { u('.GM_config button[id$="_saveBtn"]').html(d("save")), u('.GM_config button[id$="_closeBtn"]').html(d("close")), u("#GM_config_resetLink").html(p("reset")); } function m(e, t) { $e = t, r(), $e.replace(/thread_/i, "") > Pe.replace(/thread_/i, "") && A(e + "Last", t); } function b() { D(Oe, yt + GM_getValue(Oe).replace(/^.*?{/, "").replace(/} *@-moz-document.*/, ""), !1); } function v(e, t) { for (var n = t.split("&"), a = 0; a < n.length; a++) { var i = n[a].split("="); i.length >= 2 && dt.includes(i[0]) && ("false" == i[1] ? GM_config.fields[i[0]].value = !1 : GM_config.fields[i[0]].value = i[1], GM_config.fields[i[0]].reload()); } } function y() { !function() { if (GM_config.get("enCNavF") && "/deals/" != F && "/gutscheine/" != F) { var e = u("header").html(); u("header").replace('<header class="enFixedNav">' + e + "</header>"); var t = Re.every; F == w("discussion") && (t += Re.discus), (u(".nav-subheadline").length || "/profile/" == F) && (t += Re.subnav), L(t = t.replace(Je[Ke], vt)); } }(), function() { if (ze) if (ze = !1, F.match(Fe)) { if (Pe = GM_getValue(Ve, ""), function() { if (K) { var e = Date.now() / $, t = e - GM_getValue("enLastCheck" + Ve, "0"); (t > J || 0 > t) && (GM_setValue("enLastCheck" + Ve, e), q(Ve, m)); } }(), r(), "" == I.search) { var e = !0; u("article").not(".threadWidget-item").each(function(t) { if (e && 0 == u(t).find(".cept-pinned-flag").length) return GM_setValue(Ve, u(t).attr(Xe)), GM_setValue(Ve + "Last", Pe), K && (GM_config.get("enCSyncT"), Date.now() / $ - GM_getValue("enLastCheck" + Ve, "0") > 5 && (delay = 500), setTimeout(function() { D(Ve, GM_getValue(Ve, "")); }, GM_config.get("enCSyncT", 10) * $ / 2)), e = !1; }); } } else !function() { var e = GM_getValue(We + "LastSec", ""); GM_setValue(e, GM_getValue(e + "Last", "")); }(); }(), Ae.setHours(0, 0, 0, 0), Be = T('<span class="hide--toW2"><EN-LANG:today> </span>', enTimeLang, fe), Ie = T('<span class="hide--toW2"> <EN-LANG:oclock></span>', enTimeLang, fe), Te = T("<EN-LANG:yesterday> ", enTimeLang, fe), o(), function() { O && !GM_config.get("enConfWhitelist").includes(Y) && (GM_config.set("enConfWhitelist", "@" + Y + "," + GM_config.get("enConfWhitelist")), GM_config.setValue("enConfWhitelist", GM_config.get("enConfWhitelist"))); var e = GM_config.get("enConfBlacklist").replace(De[0], ""); Ge = RegExp(e.replace(/^,|,$/g, "").replace(/(.),(.)/g, "$1|$2"), "i"), (ke = !" ".match(Ge)) || "" == e || alert(d("regexfailed")), _e = RegExp(GM_config.get("enConfWhitelist").replace(/^,|,$/g, "").replace(/(.),(.)/g, "$1|$2"), "i"), xe = !" ".match(_e), we = GM_config.get("enCBlackC"), ke = ke && we != U, i(), u("." + Ne).removeClass(Ne), n(); }(), function() { if (kt = 5, ie) { u("footer ul").length && (Me = "%0D%0A%0D%0A-- %0D%0A" + u("footer ul li p").first().innerHTML.replace(/<br>/g, "%0D%0A").replace(/<.*?>/g, "")); var t = I.pathname, n = 0; switch ("" != Y && (t = t.replace(Y + "/", "")), u(".ico--type-grid-subNavActive, .thread-list--type-card ").length && (n = 1), ve = he[0] + he[1 + n] + he[3], !0) { case t.endsWith("profile/saved-deals"): ve += he[4] + he[5 + n] + he[7], ye = !0; break; case t.endsWith("profile/diskussion"): case O && t.endsWith(Y): ve += he[8] + he[9 + n] + he[11]; } ve = T(ve + he[12] + he[13 + n] + he[15], enDealLang, fe), te = T(he[16] + he[17] + he[19], enDealLang, fe); } e(); }(); } function M() { r(), location.search.match(/^page=/) ? Ee.value = parseint(location.search.replace(/^page=/, "")) : u(".js-sticky .text--color-charcoalTint").length && (Ee.value = parseInt(u(".js-sticky .text--color-charcoalTint").html().replace(/\r?\n|\r/g).split('--toW2">' + w("page"))[1])), o(), n(), e(); } function C() { var e = N(B(u(".nav").first(), "background-color"), .1), t = N(B(u(".btn--mode-special").first(), "background-color"), .1), n = N(e, .7), a = function() { var e = B(u("#main").first(), "background-color").split(","), t = parseInt(e[0].slice(4)), n = parseInt(e[1]), a = parseInt(e[2]); return Math.round((t + n + a) / 3); }() > 100 ? "" : "body, .user, .thread-title, .subNavMenu-link {color: #aaa !important} article, section {border: 1px #666 solid}"; L(" .GM_config {background-color: " + e + " !important; color: " + n + ";} .GM_config .section_header, .GM_config .config_header {background-color: " + N(e, -.25) + " !important; color: " + n + " !important;} .nav-link-text:hover, .js-navDropDown-messages:hover, .js-navDropDown-activities:hover { background-color: " + N(e, .1) + " !important;} .GM_config input[type=button] { background-color: " + t + " !important; border-color: " + t + " !important; min-width: 10em;} .GM_config input[type=button]:hover, .btn--mode-special:hover { background-color: " + N(t, .2) + " !important; border-color: " + N(t, .2) + " !important;}" + a), function() { rt = "", lt = [], ct = 0, u(".navMenu-page").off("click"), u("." + Ze).remove(), at.setAttribute("style", "background-position: -.00071em -176.85em; width: .85786em; display: inline-block; height: 1.42929em; background-image: url(https://assets.mydealz.de/assets/img/icons_5a065.svg); background-repeat: no-repeat; background-size: 5.50071em 590.57214em; cursor: pointer;"); var e = u(".subNavMenu .subNavMenu-layer").first(); e && e.after(at), z || c("Main", "<EN-LANG:discussion>", w("discussion"), "enMainDiscussion"), c("Main", "<EN-LANG:enstyler>", '<EN-LANG:enhref>" target="_blank', "enMainHomepage", "home"), c("Main", "Enstyler Discussion", "https://www.mydealz.de/diskussion/enstyler-856062", "enMainHomepage", "page"), c("MainButton", "<EN-LANG:settings>", f, nt, "gear-grey"); }(), function() { if (GM_config.get("enCPageP")) { var e, t, n, a = 1, i = 1; if (u(Ee).empty(), u("div.text--color-charcoalTint").length) { var o = u("nav > div.text--color-charcoalTint").html().replace(/\r?\n|\r/g); isNaN(a = parseInt(o.replace(/.*currentPage=/, ""))) && (a = 1), isNaN(i = parseInt(o.replace(/.*lastPage=/, ""))) && (i = a); } for (x = 1; x <= i; ) (n = document.createElement("option")).text = x, Ee.add(n), t = x, e = Math.abs(a - x), 10 > x || 5 > e ? x++ : 1e3 > x && e > 600 ? x += e / 3.5 : x += Math.floor(e / 2), e > 9 && x > 9 && (50 > e || 50 > x ? x = 2 * Math.floor(x / 2) : x = 5 * Math.floor(x / 5)); a > i && (i = a), i > t && ((n = document.createElement("option")).text = i, Ee.add(n)), Ee.value = a; var r = [ ".js-navDropDown-messages", Ce + " js-navDropDown-messages vAlign--all-m" ]; u(".test-loginButton").length && (r[0] = ".test-loginButton"), u(".voteBar").length && (r = [ ".voteBar--sticky-off--hide.hAlign--all-r", Ce + " subNavMenu-link subNavMenu-btn voteBar--sticky-off--hide" ]), Ee.setAttribute("class", r[1]), u(r[0]).before(Ee); } }(), Z ? u("#main").on("DOMSubtreeModified", S(300, function() { M(); })) : u(".js-pagi-bottom").on("DOMSubtreeModified", S(200, function() { M(); })); } function E() { if (!function() { var e = I.href; return !!e.startsWith("https://www.amazon") && (GM_config.get("enCRedirect") && (e.includes("/gp/aw/d/") ? window.location.replace(e.replace("/gp/aw/d/", "/dp/")) : e.includes("/gp/aw/ol/") ? window.location.replace(e.replace("/gp/aw/ol/", "/gp/offer-listing/")) : (ee("AMAZON redirect failed ... redirect to main page"), window.location = I.protocol + I.host)), !0); }()) if (u("#messages-list").length || u("#footer").length) { if (L(GM_getValue("Enstyler2_CSS", ""), 'domain("' + I.hostname), ne = GM_config.get("enCCMail"), ie = GM_config.get("enCDealA"), oe = GM_config.get("enCTouch"), se = GM_config.get("enCCompact"), ue = GM_config.get("enCPrice"), re = GM_config.get("enCFixHtml"), ce = GM_config.get("enCDealVbar"), le = ce != U, ue && (yt += ".threadGrid-title .flex, .threadGrid-title .overflow--fade {display: none;}"), se && (yt += ".threadGrid {padding: .3em !important;} .threadGrid-headerMeta, .threadGrid-title {height: 2.8em;}.thread-title {white-space: nowrap;} .threadGrid-headerMeta {height: 2.3em;}.space--mt-2, .space--mv-2 {margin-top: .25em;} .vote-box {height: 2.1em} .votebar {top: 0;} .threadTempBadge-icon {font-size: 1.3em !important;}", ue && (yt += ".threadGrid-headerMeta, .threadGrid-title {height: 2em !important;}")), oe && (yt += "article .footerMeta-commentsSlot .ico::before, article .threadItem-footerMeta .ico::before, article .threadCardLayout--row--small .ico::before, .thread-userOptionLink.ico:before {-webkit-transform: scale(1.7); transform: scale(1.7); width: 1.5em; left: .4em;}.ico--reduce3 {left: .5em;} #emergency {transform: scale(1.5); margin-left: .7em;}article a.btn--circle {-webkit-transform: scale(1.5); transform: scale(1.5); left: -1em; margin-left: 3em; width: 4em;}.vote-down, .vote-up {padding-top: 0.25em; padding-bottom: 0.25em} .thread-avatar { width: 2.3em; height: 2.3em;}"), le || (yt += ".threadTempBadge { display: unset; }"), L(yt + tt), I.pathname.match(de)) return; G(); } else window.requestAnimationFrame(E); } function G() { var e = B(u(".nav, #navigation").first(), "background-color").replace(/[^\(]*/, ""); u(".vwo-deal-button, #footer").length && "" != e ? function() { var e = Date.now(); (O = u(".avatar--type-nav").length) ? (Y = (Y = u(".navDropDown a").attr(Ue)).replace(/.*\/profile\/([^\/]+).*/, "$1"), GM_setValue("enCSyncUser", Y)) : Y = GM_getValue("enCSyncUser"), F = I.pathname.replace(/\/([^\/]+\/*).*/, "/$1"), l(), document.body.appendChild(pt), L(".bg--off {background-color: " + N(B(u(".bg--main").first(), "background-color"), -.08) + "!important;}"), vt = function(e) { e = "string" == typeof e ? document.querySelector(e) : e; var t = window.getComputedStyle(e), n = parseFloat(t.marginTop) + parseFloat(t.marginBottom); return Math.ceil(e.offsetHeight + n); }("header"), y(), EnstylerStartupDelay = Date.now() - e, setTimeout(C, 300); }() : window.requestAnimationFrame(function() { setTimeout(G, 80); }); } function k() { u("#advancedsettings_area").attr("class", "advancedsettings_shown"), u(".advanced_button").remove(), Mt.setAttribute("style", "font-size: 1.1em; padding: 0.8em;"), u("#button_middle").first().after(Mt), window.scrollTo(0, 600), _(); } function _() { Mt.value = d("options"); var e = GM_getValue(Ye, ""), t = (e = e.replace(/\n/g, "")).split(";"); if ("" != e && e.startsWith("#")) { for (var n = 0; n < t.length; n++) { var a = t[n].split(":"); a[0].startsWith("#setting") ? (u(a[0]).first().selectedIndex = "-1", u(a[0]).first().value = a[1]) : a[0].startsWith("#option") ? u(a[0]).first().checked = !0 : "" != a[0] && ee('ignoring unkown option: "' + a + '"'); } L("#button { display: none; }"); } } function w(e) { return function(e, t) { return enSiteConfig.hasOwnProperty(e) && enSiteConfig[e].hasOwnProperty(t) ? enSiteConfig[e][t] : ""; }(V, e); } function T(e, t, n) { return enDealLang.hasOwnProperty(n) && void 0 !== t[n] || (n = "en"), (e = e.replace(pe, function(e, a) { return t.hasOwnProperty(n) && t[n].hasOwnProperty(a) ? t[n][a] : a; })).match(pe) ? T(e, t, n) : e; } function L(e, t) { // check if style contains @-moz-document rules if (void 0 === t && (t = ""), e.match(Et.detect)) { "" == t && (t = I.hostname); var n = e.split(t); e = ""; for (var a = 1; a < n.length; a++) -1 != n[a].indexOf("{") && (e += n[a].replace(Et.split, "").replace(Et.next, "")); } for (var i, o = 0, r = Gt; e.length > r && (i = e.substring(r).indexOf("}.")) > 0; ) L(e.slice(o, r += i + 1)), o = r, r += Gt; var l = document.createElement("style"); l.innerHTML = e.slice(o), document.body.appendChild(l); } function N(e, t) { if (void 0 === t && (t = .1), void 0 === e) return "rgba(0,0,0,0)"; var n = e.split(","), a = 0 > t ? 0 : 255, i = 0 > t ? -1 * t : t, o = parseInt(n[0].slice(4)), r = parseInt(n[1]), l = parseInt(n[2]); return "rgb(" + (Math.round((a - o) * i) + o) + "," + (Math.round((a - r) * i) + r) + "," + (Math.round((a - l) * i) + l) + ")"; } function S(e, t) { var n = null; return function() { clearTimeout(n), n = setTimeout(function() { t.call(this); }, e); }; } function D(e, t, n) { if ("" != Y && X != U) { if (void 0 === n && (n = !0), e + t == xt) return; xt = e + t; var a = n ? function(e) { return btoa(sjcl.encrypt(H(Y + ":" + X), e)); }(t) : LZString.compressToEncodedURIComponent(t), i = _t + "ID=" + R(e) + "&value=" + a; GM_xmlhttpRequest({ method: "GET", url: i }); } } function R(e) { return H(Y + ":" + X + "&key=" + e); } function q(e, t, n) { if ("" == Y && (Y = GM_getValue("enCSyncUser")), "" != Y && X != U) { void 0 === n && (n = !0); var a = "https://dealz.rrr.de/enstyler/load.php?ID=" + R(e); GM_xmlhttpRequest({ method: "GET", url: a, onload: function(a) { 200 === a.status && a.responseText.length > 30 && t(e, n ? function(e) { return sjcl.decrypt(H(Y + ":" + X), atob(e)); }(a.responseText) : LZString.decompressFromEncodedURIComponent(a.responseText)); } }); } } function A(e, t) { GM_setValue(e + "", t + ""); } function H(e) { return sjcl.codec.hex.fromBits(sjcl.hash.sha256.hash(e)); } function B(e, t) { if (window.getComputedStyle) try { return getComputedStyle(e).getPropertyValue(t); } catch (e) {} else if (e.currentStyle) try { return e.currentStyle[t]; } catch (e) {} return ""; } var I = location, W = I.hostname.replace("www.", ""), V = function(e) { return e[0].toUpperCase() + e.slice(1); }(W.replace(/^\.|\..*/g, "")), z = "Mydealz" != V, P = 1440, $ = 6e4, j = $, O = !1, Y = "", F = I.pathname.replace(/\/([^\/]+\/*).*/, "/$1"), U = "off", X = U, K = !1, J = 5, Z = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent); /Linux/i.test(navigator.userAgent) && void 0 !== GM_info.scriptHandler && GM_info.scriptHandler.startsWith("USI") && (Z = !0); var Q = "enMobileLog", ee = console.error; GM_setValue(Q, "Enstyler Log\n"); var te, ne, ae, ie, oe, re, le, ce, se, ue, de = /settings$/, pe = /<EN-LANG:(.*?)>/g, fe = void 0 === enSiteConfig[V] ? "en" : enSiteConfig[V].lang, ge = I.protocol + "//" + I.host + I.pathname, he = [ '<a title="<EN-LANG:post>" class="link ico ico--pos-l ico--type-comment-blue linkPlain space--h-3"href="<ENSTYLER-HREF-HERE>#comment-form" data-handler="track" data-track="{"action":"scroll_to_comment_add_form","label":"engagement"}">', '<span class="hide--toW3"><EN-LANG:post></span>', "", "</a>", '<a title="<EN-LANG:remove>" class="link text--color-blue ico ico--type-bookmark-blue linkPlain ico--pos-l space--h-3"data-handler="track replace" data-replace="{"endpoint":"https://www.mydealz.de/threads/<ENSTYLER-ID-HERE>/remove","method":"post"}" data-track="{"action":"save_thread","label":"engagement"}">', '<span class="hide--toW3"><EN-LANG:remove></span>', "", "</a>", '<a title="<EN-LANG:edit>" class="link text--color-blue ico ico--type-pencil-blue linkPlain ico--pos-l space--h-3"href="<ENSTYLER-HREF-HERE>/edit" data-handler="track" data-track="{"action":"goto_Update startededit_form","beacon":true}">', '<span class="hide--toW3"><EN-LANG:edit></span>', "", "<span></a>", '<a title="<EN-LANG:mail>" class="link text--color-blue ico ico--type-mail-blue linkPlain ico--pos-l space--h-3"href="mailto:?subject=<ENSTYLER-TEXT-HERE>" <span class="hide--toW3">', '<span class="hide--toW3"><EN-LANG:mail></span>', "", "<span></a>", '<a title="<EN-LANG:mail>" class="btn btn--whatsapp btn--circle size--all-xs space--ml-2" style="background-color: #69be28;"', 'href="mailto:?subject=<ENSTYLER-TEXT-HERE>"><span class="ico ico--type-mail-white ico--reduce size--all-xxl">', "</span></a>", "</span></a>" ], me = '<span class="vote-tempIco ico ico--type-flame2-red threadTempBadge-icon" style="position: absolute; display: block; margin-left: .3em; font-size: 2em;"></span>', be = '<span class="vote-tempIco ico ico--type-snowflake-blueTint threadTempBadge-icon" style="position: absolute; display: block; margin-left: .3em; font-size: 2em;"></span>', ve = "", ye = !1, Me = "", Ce = "enPageEnum", Ee = document.createElement("select"); Ee.id = Ce, Ee.setAttribute("class", Ce), Ee.onchange = function() { var e = document.getElementById(Ce), t = "page=" + e.options[e.selectedIndex].value, n = ("" + I).replace(/page=.*|#.*/, ""); n.endsWith("?") || n.endsWith("&") ? n += t : n += "?" + t, "/deals/" == F && (n += "#thread-comments"), window.location = n; }; var Ge, ke, _e, xe, we, Te, Le = "enClassHidden", Ne = "enClassBlackDone", Se = 0, De = [ /[\[\]\(\)\{\}\?\:\;\!\"\*\+\ ]/g, /[\[\]\(\)\{\}\?\.\:\;\!\"\*\+\,]/g ], Re = { every: ".enFixedNav { display: block; position: fixed; width: 100%; z-index: 120;} .subNav, .profileHeader, .tabbedInterface, .splitPage-wrapper {margin-top: <ENSTYLER-TEXT-HERE>px}", subnav: ".subNav {margin-top: 0 !important;} .nav-subheadline {margin-top: <ENSTYLER-TEXT-HERE>px}", discus: ".tGrid.page2-center.height--all-full {margin-top: calc(<ENSTYLER-TEXT-HERE>px + 10px);} #footer .page-content { padding-top: calc(<ENSTYLER-TEXT-HERE>px + 10px);}" }, qe = new Date(), Ae = new Date(), He = "enTimeSeen", Be = "", Ie = "", We = "enNewest" + W, Ve = We + "-" + F.replace(/\//, ""), ze = !0, Pe = "", $e = "", je = "https://userstyles.org/styles/128262/enstyler2-style-your-mydealz.css", Oe = "Enstyler2_CSS", Ye = "EnstylerCssOpt", Fe = /^\/$|^\/hot$|^\/new$|^\/settings$|^\/discussed$|^\/hei%C3%9F$|^\/diskutiert$/, Ue = "href", Xe = "id", Ke = "text", Je = { href: /<ENSTYLER-HREF-HERE>/g, id: /<ENSTYLER-ID-HERE>/g, text: /<ENSTYLER-TEXT-HERE>/g }, Ze = "enNavEntry", Qe = { Main: '<a class="enNavEntry navMenu-link" id="<ENSTYLER-ID-HERE>" href="<ENSTYLER-HREF-HERE>" data-handler="track" data-track="{"action":"goto_main_target","beacon":true}"><span class="navMenu-link-ico ico ico--type-discussion-navMenuLayerItem navMenu-ico--selected--type-discussion navMenu-ico--hover--type-discussion"></span><ENSTYLER-TEXT-HERE></a>', Sub: '<li class="enNavEntry subNavMenu-item--separator test-tablink-discussed"><a href="<ENSTYLER-HREF-HERE>" class="subNavMenu-item subNavMenu-link space--h-4 vAlign--all-m" id="<ENSTYLER-ID-HERE>" data-handler="track" data-track="{"action":"goto_menu_target sort","label":"diskutiert","beacon":true}"><span class="box--all-i size--all-xl vAlign--all-m"><ENSTYLER-TEXT-HERE></span><span class="js-vue-container--threadcount" data-handler="vue" data-vue="{"count":null}"></span></a></li>', MainButton: '<a class="enNavEntry navMenu-link" id="<ENSTYLER-ID-HERE>"><span class="navMenu-link-ico ico ico--type-discussion"></span><ENSTYLER-TEXT-HERE></a>' }, et = '<div id="enButt"><a title="Grid Layout" id="enGrid" href="' + ge + '?layout=grid"><img src="https://dealz.rrr.de/enstyler/grid.png"></a><a title="List Layout" id="enList" href="' + ge + '?layout=horizontal"><img src="https://dealz.rrr.de/enstyler/list.png"></a><a title="Text Layout" id="enText" href="' + ge + '?layout=text"><img src="https://dealz.rrr.de/enstyler/text.png"></a></div>', tt = "#enGrid, #enList, #enText { padding: 0.5em; } #enButt {left: 3em; top: 1em; padding-left: 4em; display: inline-block;}", nt = (Qe.length, "EnstylerButton"), at = document.createElement("input"); at.type = "button", at.setAttribute(Xe, "emergency"), at.onclick = f, at.value = " "; var it, ot = "--type-discussion", rt = "", lt = [], ct = 0, st = (GM_info.scriptWillUpdate, T("<EN-LANG:unblack> <ENSTYLER-TEXT-HERE> Dealz", enConfigLang, fe)), ut = []; ut.default = { enCSS: { label: d("configcss"), title: p("configcss"), type: "button", click: function() { it = window.open("https://userstyles.org/styles/128262", "UserCSS", "left=0,top=0"), GM_setValue("enLastUpdateCheck", 0); } }, enJS: { label: d("userscript"), title: p("userscript"), type: "button", click: function() { it = window.open("https://greasyfork.org/scripts/24243-enstylerjs/code/EnstylerJS.user.js", "UserScript", "width=210,height=210,left=0,top=0"), setTimeout(it.close, 5e3); } }, enCNavF: { label: d("navfixed"), title: p("navfixed"), type: "checkbox", default: !0, section: [ d("config"), "" ] }, enCMax: { label: d("max"), title: p("max"), type: "select", options: enSiteConfig.width, default: "1280" }, enCDealA: { label: d("dealaction"), title: p("dealaction"), type: "checkbox", default: !0 }, enCDealVbar: { label: d("dealvotebar"), title: p("dealvotebar"), type: "select", options: enSiteConfig.votescale, default: "500" }, enCTouch: { label: d("touch"), title: p("touch"), type: "checkbox", default: !0 }, enCWidth: { label: d("width"), title: p("width"), type: "select", options: enSiteConfig.width, default: U }, enCPrice: { label: d("price"), title: p("price"), type: "checkbox", default: !1 }, enCCompact: { label: d("compact"), title: p("compact"), type: "checkbox", default: !1 }, enCCMail: { label: d("cssdealz"), title: p("cssdealz"), type: "checkbox", default: !0 }, enCRedirect: { label: d("redir"), title: p("redir"), type: "checkbox", default: !0 }, enCPageP: { label: d("picker"), title: p("picker"), type: "checkbox", default: !0 }, enCDealT: { label: d("dealtime"), title: p("dealtime"), type: "checkbox", default: !0 }, enCFixHtml: { label: d("fixhtml"), title: p("fixhtml"), type: "checkbox", default: !0 }, enCBlackC: { label: d("blacklist"), title: p("blacklist"), type: "select", options: enSiteConfig.blackcold, default: "-20" }, enConfBlacklist: { label: d("black"), title: p("black"), type: "text", size: 70, default: "" }, enConfWhitelist: { label: d("white"), title: p("white"), type: "text", size: 70, default: "" }, enCUnblackL: { label: d("unblack"), title: p("unblack"), type: "button", click: function() { i(); } }, enCLang: { label: d("lang"), title: p("lang"), type: "select", options: enSiteConfig.languages, default: "" } }, ut.sync = { enCAutoS: { label: d("autosync"), title: p("autosync"), type: "checkbox", section: [ d("syncconf"), "" ], default: !0 }, enCSyncT: { label: d("synctime"), title: p("synctime"), type: "select", options: enSiteConfig.synctimes, default: "5" }, enCSyncKey: { label: d("synckey"), title: p("synckey"), type: "text", size: 16, default: U }, enCSync: { label: d("sync"), title: p("sync"), type: "button", click: function() { q(Ye, A), q(ht, v); } } }; var dt = [ "enCNavF", "enCDealA", "enCDealVbar", "enCTouch", "enCRedirect", "enCPageP", "enCFixHtml", "enCDealT", "enCBlackC", "enConfBlacklist", "enConfWhitelist", "enCAutoS" ], pt = document.createElement("div"); pt.setAttribute("class", "GM_config"); var ft = !1, gt = [ { val: U, field: "enCBlackC", rem: "enConfWhitelist" }, { val: U, field: "enCBlackC", rem: "enConfBlacklist" }, { val: U, field: "enCBlackC", rem: "enCUnblackL" }, { val: U, field: "enCSyncKey", rem: "enCSync" }, { val: U, field: "enCSyncKey", rem: "enCAutoS" }, { val: U, field: "enCSyncKey", rem: "enCSyncT" } ], ht = "enSettings", mt = !1; if (window.location.hostname.endsWith("userstyles.org")) GM_config.init({ id: "GM_config", title: d("headline") + " CSS", fields: { saveOpt: { section: [ d("savecss"), "" ], label: d("howtocss"), type: "textarea", size: 70 } }, events: { open: function() { h(); }, save: function() { _(), setTimeout(window.close, 1e3); }, close: function() { g(); } }, frame: pt }), window.onload = function() { document.body.appendChild(pt), L(yt + "#buttons {visibility: hidden;} #ownedButtons {visibility: visible; border: 1px solid red;}"), L(GM_getValue("Enstyler2_CSS", ""), "url(https://userstyles.org"), setTimeout(k, 500); }; else { var bt = !1; GM_config.init({ id: z ? "GM_config" + W : "GM_config", title: d("headline"), fields: Object.assign(ut.default, ut.sync, ut.debug), events: { open: function() { bt = GM_config.get("enCNavF"), h(), u("#GM_config_enJS_var").after(et); for (var e = 0; e < gt.length; e++) GM_config.get(gt[e].field) == gt[e].val && GM_config.fields[gt[e].rem].remove(); Z || GM_config.fields.enCWidth.remove(); }, save: function() { !function() { D(Ye, GM_getValue(Ye)), b(); for (var e = "", t = 0; t < dt.length; t++) e += dt[t] + "=" + GM_config.get(dt[t]) + "&"; D(ht, e); }(), GM_setValue("enWidth", GM_config.get("enCWidth")), GM_setValue("enMax", GM_config.get("enCMax")), GM_config.close(), f(), mt = !0; }, close: function() { g(), mt && window.location.reload(), l(); } }, frame: pt }), X = GM_config.get("enCSyncKey"), K = GM_config.get("enCAutoS"), J = GM_config.get("enCSyncT", J); } var vt, yt = [ ".threadWidget-footer::after {display: none !important} .GM_config {color: white !important; opacity: 0.92 !important; left: 5% !important; height: auto !important; top: 1.4em !important; box-shadow: 10px 10px 20px black; min-width: 21em; max-width: 40em !important; border-radius: 10px} #enOverDim {background-color: black; z-index: 999; position: fixed; top: 0; right: 0; bottom: 0; left: 0; opacity: 0.5} .GM_config input, .GM_config button, .GM_config textarea { border: 1px solid; margin: 0.5em 0em 0.2em 1em; padding: 0.1em;} .GM_config .reset { font-size: 9pt; padding-right: 1em; } .GM_config .config_header {font-size: 14pt !important; border: none !important; padding: 0.2em; font-weight: bold; text-align: center;} .GM_config .section_header { border: none !important; background-color:#005293 !important; !important; text-align: center; margin-top: 1em;} .GM_config .field_label:hover {color: gray;} .GM_config a:hover {text-decoration: underline; color: darkgray;} .GM_config .config_var {display: inline-block;} .GM_config .field_label {display: inline-block; min-width: 14em; margin-left: 2em; } .GM_config button, .GM_config input[type=button] { font-weight: bold; text-align: center; color: #fff; background-color: #58a618 !important; } .GM_config button:hover {background-color: #a5d867 !important; border-color: #a5d867 !important;} .enClassHidden, #EnPopup_closeBtn, .voteBar-- { display: none !important; } .votebar {display: inline-block; position: relative; top: .3em; height: .5em; margin-left: 2.5em; max-width: 80% } .voteBar--warm { background-color: #ffb612 } .voteBar--hot { background-color: #e00034 } .voteBar--burn { background-color: #e00034 } .voteBar--cold, .voteBar--colder { background-color:: #00a9e0 } .voteBar--cold, .voteBar--colder { background-color: #5bc6e8 } .threadTempBadge { display: none; } .flex--justify-space-between { justify-content: unset !important; }", ".page2-center, .thread-list--type-list--sideAds, .thread-list--type-list { max-width: " + GM_getValue("enMax") + "px !important;}" ].join(" "), Mt = document.createElement("input"); Mt.type = "button", Mt.setAttribute(Xe, nt), Mt.onclick = function() { !function() { var e, t, n, a = ""; u("#style-settings select").each(function(i) { e = u(i).attr(Xe), t = i.value, n = u("option[value=" + t + "]").text(), a += "#" + e + ":" + t + ":" + n + ";\n"; }), u("#style-settings input[type=text]").each(function(i) { e = u(i).attr(Xe), t = i.value, a += "#" + e + ":" + t + ":" + (n = "RGB-Clolor") + ";\n"; }), u("#style-settings input:checked").each(function(i) { e = u(i).attr(Xe), t = i.value, n = u("label[for=" + e + "]").text(), a += "#" + e + ":" + t + ":" + n + ";\n"; }), GM_config.set("saveOpt", a), GM_setValue(Ye, a); }(), f(); }, Mt.value = d("options"); //var isIE = /*@cc_on!@*/false || !!document.documentMode; var Ct = GM_getValue("enWidth"); Z && Ct != U && u("meta[name=viewport]").attr("content", "width=" + Ct + "px, initial-scale=1"); var Et = { detect: /.*?@-moz-document .*?\{\s*/, split: /^.*?\{/, next: /}\s*@-moz-document.*/ }, Gt = 16100, kt = 5, _t = "https://dealz.rrr.de/enstyler/save.php?", xt = ""; "auto" != GM_config.get("enCLang") && (fe = GM_config.get("enCLang")), window.eval("window['ga-disable-UA-2467049-1'] = true;"), E();