您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
remet la jauge de température sur les deals.
当前为
// ==UserScript== // @name Back to dealabs // @namespace http://tampermonkey.net/ // @version 0.1 // @description remet la jauge de température sur les deals. // @author Rasmus // @match https://www.dealabs.com/* // @grant none // ==/UserScript== (function() { 'use strict'; $('.thread--deal .threadGrid').each(function() { var temperature = parseInt($(this).find('.vote-box > span').text().replace('°', '').replace('Expiré', '').trim()); temperature = temperature > 100 ? 100 : temperature; var class_temperature = temperature >= 0 ? 'deal--hot' : 'deal--cold'; console.log(temperature); $(this).append("<div class='jauge' style='width:3em;grid-column: 5;grid-row: 1;grid-row-end: 5;position:relative;'><div class='jauge-fill "+ class_temperature +"' style='z-index:3;position:absolute;margin-top:10px;bottom:10px;width:10px;right:0;background-color:red;height:"+ temperature +"%;'></div><div class='jauge-background' style='height:100%;position:absolute;margin-top:10px;bottom:10px;width:10px;right:0;background-color:grey;'></div></div>"); }); })();