User:Zhaofeng Li/Scratchpad

From Wikipedia, the free encyclopedia

Scratchpad is a sandbox which resides entirely in your browser. You can experiment with markup, take notes and prototype new articles on Scratchpad, without making any edit to the wiki itself. When you have multiple browser tabs open with Scratchpad, their content changes simultaneously as you type in one of them.

Try it out![edit]

You can try Scratchpad out by typing this in your address bar and hit enter:

javascript:importScript('User:Zhaofeng Li/Scratchpad.js');

Note that it doesn't work in all browsers. If it works, click on the Scratchpad link in your Tools sidebar to launch.

Installing[edit]

Insert this line into your common.js file:

{{subst:iusc|User:Zhaofeng Li/Scratchpad.js}}

Save and refresh the page, it'll add a link labeled Scratchpad in your Tools sidebar. Click it to launch Scratchpad.

Using Scratchpad[edit]

You can create a new tab by clicking the + button on the top. Changes are saved automatically. When you are ready, use the preview button to preview your code. If you want to save the current page to Scratchpad, use the fork button - This will create a new tab with the source of the current opened page. Be aware that the [x] button on the tabs completely delete the tab, which is irreversible.

Requirements[edit]

Scratchpad needs a browser with Web Storage and jQuery support. Many browsers have those, if yours don't, consider updating your browser to a newer version, or switch to a browser like Mozilla Firefox.