This commit is contained in:
cilame 2022-10-13 00:38:13 +08:00
parent de013557b0
commit 46329ceeaa
8 changed files with 48 additions and 8 deletions

View File

@ -72,6 +72,6 @@
},
"manifest_version": 2,
"chrome_url_overrides": {
"newtab": "astexplorer_babel.html"
"newtab": "new_tab_overwrite.html"
}
}

12
new_tab_overwrite.html Normal file
View File

@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8">
</head>
<body>
<script type="text/javascript" src="./tools/redirect.js"></script>
</body>
</html>

View File

@ -159,6 +159,7 @@
<textarea id='fetch_hook' data-key="config-fetch_hook" style="width: 100%; height: 500px"></textarea>
</section>
<section class="tab">
<button id='open_ast_page'>打开本地ast页面</button>
<button id='sojson'>解密sojson混淆</button>
<button id='obnormal'>普通解混淆</button>
<button id='ob'>解密ob高级混淆</button>
@ -188,7 +189,7 @@
<br/>
<hr>
<label>code</label>
<textarea id='code_model' style="width: 100%; height: 500px"></textarea>
<textarea id='code_model' style="width: 100%; height: 500px" placeholder="附加功能拖拽文件到该窗口自动输出base64内容"></textarea>
</section>
<section class="tab">
<div>jsobfuscator混淆器</div>

View File

@ -568,6 +568,20 @@ proxy_js.addEventListener("click", function(){
code_model.value = clear_mode(mk_proxy_code)
})
var code_model = document.getElementById('code_model')
code_model.ondragover = function(e) {
e.preventDefault();
}
code_model.ondrop = function(e) {
e.preventDefault();
var f = e.dataTransfer.files[0];
var fr = new FileReader();
fr.readAsDataURL(f);
fr.onload = function(e) {
code_model.value = this.result;
}
}
var add_script_in_all_document = document.getElementById('add_script_in_all_document');
add_script_in_all_document.addEventListener("click", function(){
debug_tab = true

View File

@ -124,7 +124,7 @@
<label class="switch">
<input type="checkbox" data-key="config-hook-new-tab"><div class="slider"></div>
</label>
<div style="float: right; padding: 10px">启用覆盖newTab页</div>
<div style="float: right; padding: 10px">配置覆盖newTab页</div>
<label class="switch">
<input type="checkbox" data-key="config-myinject_toggle"><div class="slider"></div>
</label>

View File

@ -1,9 +1,5 @@
chrome.storage.local.get(["config-hook-new-tab"], function(e) {
if(!e['config-hook-new-tab']) {
chrome.tabs.update({ url: "chrome-search://local-ntp/local-ntp.html" })
}else{
runall()
}
runall()
})
function runall(){

View File

@ -1,4 +1,5 @@
var open_ast_pagetn = document.getElementById('open_ast_page')
var sojsontn = document.getElementById('sojson')
var obtn = document.getElementById('ob')
var jsfuckbtn = document.getElementById('jsfuck')
@ -9,6 +10,14 @@ var uglify_minibtn = document.getElementById('uglify_mini')
var txt = document.getElementById('txt')
var txt2 = document.getElementById('txt2')
open_ast_pagetn.addEventListener('click', function(e){
var temp = chrome.runtime.getURL('astexplorer_babel.html')
console.log(temp)
chrome.tabs.create({
url: temp
});
})
babel_aline.addEventListener('click', function(e){
try{
;(txt2||txt).value = muti_process_aline(txt.value)

8
tools/redirect.js Normal file
View File

@ -0,0 +1,8 @@
chrome.storage.local.get(["config-hook-new-tab"], function(e) {
if(!e['config-hook-new-tab']) {
chrome.tabs.update({ url: "chrome-search://local-ntp/local-ntp.html" })
}else{
var option_page = chrome.runtime.getURL('options.html')
chrome.tabs.update({ url: option_page })
}
})