Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function e_sh(string) {
- // Backslashes are doubled since we're inside Ruby code
- return string.replace(/(?=[^a-zA-Z0-9_.\\/\\-\\x7F-\\xFF\\n])/g, '\\\\').replace(/\\n/g, "'\\n'").replace(/^$/g, "''");
- }
- function click_external_link(evt) {
- TextMate.system("open " + e_sh(evt.srcElement.href), null);
- }
- myLink.addEventListener('click', click_external_link, false);
Add Comment
Please, Sign In to add comment