firefox
Vimperator

VimperatorでJavaScriptのON/OFFをトグルする

More than 3 years have passed since last update.

about:configjavascript.enabledをトグルさせるVimperatorの設定です。


toggleJavaScript.js

//Toggle JavaScript On/Off

;(function() {
let name = "javascript.enabled"
options.invertPref(name)
liberator.echomsg(name + "=" + options.getPref(name))
})();


.vimperatorrc

command! toggleJavaScript :source ~/.vimperator/scripts/toggleJavaScript.js

nnoremap <Leader>j :toggleJavaScript<CR>


参考資料

vimperator の :set javascript / :set nojavascript で JS の on/off 切り替え