User:Whiteknight/per book/Control Systems.js
(Redirected from User:Whiteknight/Javascripts/Control Systems)
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.
Warning: Malicious code can compromise your account. Page preview will cause your web browser to execute this page's content as code under some skins, including Monobook. If you have any questions about any code you plan to add, you can ask at the appropriate reading room. |
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;
}
$(ControlSystemsChangeTab);
$(ControlSystemsChangeTitle);
//</pre>