From 02949230587c5012e77c14a5abdff1332308cc82 Mon Sep 17 00:00:00 2001 From: Fredrick Brennan Date: Wed, 11 Mar 2015 18:01:59 +0800 Subject: [PATCH] Add helpful warning to user-js --- js/options/user-js.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/js/options/user-js.js b/js/options/user-js.js index 4d792979..cc48d852 100644 --- a/js/options/user-js.js +++ b/js/options/user-js.js @@ -13,8 +13,10 @@ var tab = Options.add_tab("user-js", "code", _("User JS")); +$("

"+_("Do not paste code here unless you absolutely trust the source or have read it yourself!")+"

"+_("Untrusted code pasted here could do malicious things such as spam the site under your IP.")+"").appendTo(tab.content); + var textarea = $("").css({ - "height" : "85%", + "height" : "74%", "width" : "100%", "font-size" : "9pt", "font-family": "monospace", @@ -47,8 +49,7 @@ var apply_js = function() { var update_textarea = function() { if (!localStorage.user_js) { - textarea.text("/* "+_("Enter here your own Javascript code...")+" */\n" + - "/* "+_("Have a backup of your storage somewhere, as messing here\nmay render you this website unusable.")+" */\n" + + textarea.text("/* "+_("Enter your own Javascript code here...")+" */\n" + "/* "+_("You can include JS files from remote servers, for example:")+" */\n" + '/* load_js("http://example.com/script.js"); */'); }