User:Whiteknight/per book/Control Systems.js
From Wikibooks, open books for an open world
Note: After saving, changes may not occur immediately. Click here to learn how to bypass your browser's cache.
- Mozilla / Firefox / Safari: hold down Shift while clicking Reload, or press Ctrl-Shift-R (Cmd-Shift-R on Apple Mac);
- Internet Explorer: hold Ctrl while clicking Refresh, or press Ctrl-F5;
- Konqueror: simply click the Reload button, or press F5;
- Opera users may need to completely clear their cache in Tools→Preferences.
| Code that you insert on this page could contain malicious content capable of compromising your account. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate reading room. The code will be executed when previewing this page under some skins, including Monobook. |
|
|
Documentation for this script can be added at User:Whiteknight/per book/Control Systems. |
//<pre> //Code to change the tab text and the page title of the page. Works only for this book. function ControlSystemsChangeTab(){ document.getElementById("ca-nstab-main").childNodes[0].innerHTML = "Control Systems" } function ControlSystemsChangeTitle() { var titleparts = wgPageName.split("/"); var bookname = titleparts[0].replace(/_/g, " "); if(titleparts.length > 0) { titleparts.splice(0, 1); var pagename = "<br><span style=\"font-size: smaller; margin-left: 3em;\">" + titleparts.join("/").replace(/_/g, " ") + "</span>"; bookname = bookname + pagename; } document.getElementsByTagName('h1')[0].innerHTML = bookname; } addOnloadHook(ControlSystemsChangeTab); addOnloadHook(ControlSystemsChangeTitle); //</pre>