您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Makes it difficult to leave raffles accidentally - thanks Iwasawa for original code, all I did was put it in its own script
// ==UserScript== // @name TF2R - Confirm leave raffle // @namespace auhtwoo // @description Makes it difficult to leave raffles accidentally - thanks Iwasawa for original code, all I did was put it in its own script // @include http://tf2r.com/k* // @include https://tf2r.com/k* // @grant none // @locale what // @version 1.0 // ==/UserScript== $(document).ready (function() { var btn = $('.jlbutl #enbut'), clicks; if (!btn.length) { return; } if (jQuery._data) { clicks = jQuery._data(btn.get(0), 'events').click; } else { clicks = btn.data('events').click; } clicks.unshift({type: 'click', handler: function(e) { var wantToLeave = confirm('Are you sure you want to leave this raffle?'); if (!wantToLeave) { e.stopImmediatePropagation(); return false; } }}); });