Created
July 19, 2022 14:38
-
-
Save bytemain/10576db26d3addbdcbac2397f4b60f24 to your computer and use it in GitHub Desktop.
Fundebug Userscripts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name enableBh | |
// @namespace xxxxx.enableBh | |
// @grant none | |
// @version 1.0 | |
// @match *://www.fundebug.com/* | |
// @run-at document-start | |
// @description 2020/2/28 上午12:16:59 | |
// ==/UserScript== | |
(function () { | |
var retryCount = -1, | |
maxRetry = 5, | |
timeout = 1000, | |
timer; | |
(function initScript () { | |
window.clearTimeout(timer) | |
if (!window.angular) { | |
retryCount++; | |
if (retryCount < maxRetry) { | |
timer = setTimeout(initScript, timeout) | |
} | |
return; | |
} | |
setTimeout(injectScript, 1000); | |
})(); | |
function injectScript(){ | |
var ngAppElem1 = angular.element(document.querySelector('[ng-app]') || document); | |
$rootScope1 = ngAppElem1.scope(); | |
$rootScope1.$watch(function() { | |
var elem1 = angular.element(document.querySelector("#dashboardmainpart > div > div.EventBottomChartsContainer > div.EventDetailContainer > div > ul > li:nth-child(3)")); | |
var s1 = elem1.isolateScope() || elem1.scope(); | |
if (s1) { | |
s1.disabled = false; | |
return s1.disabled; | |
} | |
return s1; | |
}); // No | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment