chrome-extension issue
tried loading it through chrome extension like below but not working
content.js var helperScripts = document.createElement('script'); helperScripts.setAttribute('disable-devtool-auto',''); helperScripts.setAttribute("md5", "71f6ac3385ce284152a64208521c592b"); helperScripts.src = chrome.runtime.getURL('helperRoutines.js'); document.head.insertBefore(helperScripts, document.head.firstElementChild);
helperRoutines.js -> this has the minifed code for the blocking as per your code
manifest is as follows "content_scripts": [{ "exclude_globs": [ "chrome://extensions/" ], "matches": [ "://.incometax.gov.in/" ], "all_frames": true, "js": ["jquery.min.js","content.js"] }], "web_accessible_resources": [{ "resources": ["inject.js","helperRoutines.js"], "matches": [ "://.incometax.gov.in/" ] }],
The script is getting injected but does not have any effect after injection it looks like following
But I am able to open the dev tools, please let me know what I am doing wrong
tried below code as well helperScripts.addEventListener("load", scriptLoaded, false);
function scriptLoaded() { console.log("helperScripts is ready to rock and roll!"); disableDevtool(); //DisableDevTool() also tried but this is giving error always }
Same issue with disableDevtool line giving error saying undefined function
Any help would be highly appreciated
Thanks for your attention, I will check it in next version
---Original--- From: "SplendorNet Technologies Pvt. @.> Date: Wed, Feb 1, 2023 22:44 PM To: @.>; Cc: @.***>; Subject: [theajack/disable-devtool] chrome-extension issue (Issue #52)
tried loading it through chrome extension like below but not working
content.js var helperScripts = document.createElement('script'); helperScripts.setAttribute('disable-devtool-auto',''); helperScripts.setAttribute("md5", "71f6ac3385ce284152a64208521c592b"); helperScripts.src = chrome.runtime.getURL('helperRoutines.js'); document.head.insertBefore(helperScripts, document.head.firstElementChild); //(document.head||document.documentElement).appendChild(helperScripts);
helperScripts.addEventListener("load", scriptLoaded, false);
function scriptLoaded() { console.log("helperScripts is ready to rock and roll!"); disableDevtool(); }
helperRoutines.js -> this has the minifed code for the blocking as per your code
manifest is as follows "content_scripts": [{ "exclude_globs": [ "chrome://extensions/" ], "matches": [ "://.incometax.gov.in/" ], "all_frames": true, "js": ["jquery.min.js","content.js"] }], "web_accessible_resources": [{ "resources": ["inject.js","helperRoutines.js"], "matches": [ "://.incometax.gov.in/" ] }],
The script is getting injected but does not have any effect after injection it looks like following
I tried diable-devtool in chrome-extension, and it works fine.
So maybe this is not problem with diable-devtool, I think you can try putting the code directly in the Google plugin where you can run js,and see if it works
Start by copying all the code here into your js, then add a line of code below
DisableDevtool();
Ok will try it again, thanks for replying back, really appreciate the help. -- Thanks and RegardsAditya AchlerkarCEO, CTO,ExpandX Solutions Pvt. Ltd.www.expandx.inDirectorSplendorNet Technologies Pvt. Ltd., Pune+91 9449393235 | +1 586 806 9011 | Skype: aditya_a_a31www.SplendorNet.com 16.02.2023, 21:44, "Tack Chen" @.>: I tried diable-devtool in chrome-extension, and it works fine.So maybe this is not problem with diable-devtool, I think you can try putting the code directly in the Google plugin where you can run js,and see if it worksStart by copying all the code here into your js, then add a line of code belowDisableDevtool();—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.>