Rosetta Code talk:Village Pump/Javascript Functionality Add: Difference between revisions

Explaination of new "My Scripts" Menu script
(→‎Live version of all JS + HTML examples: The implementation I have in mind)
(Explaination of new "My Scripts" Menu script)
 
Line 63:
::::::::: Hmm, ok... but a locked down environment which prevents the kind of javascript inspection allowed by a debugger and which allows or requires execution of javascript from arbitrary web sites is just asking for problems. --[[User:Rdm|Rdm]] 15:05, 13 July 2010 (UTC)
:::::::::: The implementation I had in mind would only echo back code+execution if it said code were signed using a timestamp(the server has a cache timeout, and I was thinking of using that as the basis for the timestamp precision.) and server-secret key (only known to my MW install and to the echoing script). That way, debuggers aren't disabled by the echo'd page, and the only code sent by the server is known to come from the RC wiki. As for client-side environments that prevent users from making changes, but don't apply additional restrictions on server-provided content, well, those environments are pretty common. I've worked in one or two, and cleaned up a half dozen more. --[[User:Short Circuit|Michael Mol]] 15:13, 13 July 2010 (UTC)
 
 
== "My Scripts" Menu ==
[[Rosetta Code:My Scripts Menu]]
 
This script adds a "My scripts" menu next to the "My preferences" button which allows users to choose which JS modules they want to use. It stores the state of these choices in a cookie so it can automatically load the same modules whenever they navigate to a new page. --[[User:Tyrok1|Tyrok1]] 22:28, 18 July 2010 (UTC)
Anonymous user