mirror of
https://git.mirrors.martin98.com/https://github.com/cilame/v_jstools
synced 2025-08-15 08:25:57 +08:00
add
This commit is contained in:
parent
36c6561df6
commit
794119388c
10
options.js
10
options.js
@ -513,8 +513,12 @@ get_now.addEventListener("click", function(){
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
function clear_mode(func){
|
function clear_mode(func, is_comment){
|
||||||
return /\{([\w\W]*)\}/.exec(func+'')[1].replace(/\/\*\*([\w\W]*?)\*\//, '$1').trim()
|
var code = /\{([\w\W]*)\}/.exec(func+'')[1]
|
||||||
|
if (is_comment){
|
||||||
|
code = code.replace(/\/\*\*([\w\W]*?)\*\//, '$1')
|
||||||
|
}
|
||||||
|
return code.trim()
|
||||||
}
|
}
|
||||||
|
|
||||||
var websocket_js = document.getElementById('websocket_js');
|
var websocket_js = document.getElementById('websocket_js');
|
||||||
@ -526,7 +530,7 @@ websocket_js.addEventListener("click", function(){
|
|||||||
var websocket_py = document.getElementById('websocket_py');
|
var websocket_py = document.getElementById('websocket_py');
|
||||||
websocket_py.addEventListener("click", function(){
|
websocket_py.addEventListener("click", function(){
|
||||||
var code_model = document.getElementById('code_model')
|
var code_model = document.getElementById('code_model')
|
||||||
code_model.value = clear_mode(mk_websocket_py_code)
|
code_model.value = clear_mode(mk_websocket_py_code, true)
|
||||||
})
|
})
|
||||||
|
|
||||||
var websocket_hook = document.getElementById('websocket_hook');
|
var websocket_hook = document.getElementById('websocket_hook');
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user