Skip to content

Instantly share code, notes, and snippets.

fun! FactorEvalInput(string)
execute "normal a" . a:string
normal `[v`]hd
return @"
endfun
fun! FactorWrite() range
if s:factorWrite
iunmap <ESC>
augroup factor
@stechz
stechz / main.js
Created June 27, 2012 21:50
Addon SDK code for removing onbeforeclose alerts.
function contentScript() {
var script = document.createElement('script');
script.setAttribute('type', 'text/javascript');
script.setAttribute('src', 'data:text/javascript,' + escape(
'(' + function() {
onbeforeunload = null;
}.toString() + ')()'));
document.body.appendChild(script);
}