User:Technical 13/Scripts/Teahouse.js
Appearance
Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page. |
Documentation for this user script can be added at User:Technical 13/Scripts/Teahouse. |
/* Load other Teahouse scripts */
importScript('User:Technical 13/Scripts/Teahouse WikiLove.js'); // Trying beta script
importScript('User:Technical 13/Scripts/Teahouse IRC.js'); // Trying out my TeaHouse IRC script... Many features to come.
/* add talkback reminder when you save an edit at the Teahouse
$( function() {
if ( mw.config.get( 'wgPageName' ) === 'Wikipedia:Teahouse/Questions' && document.getElementById( 'editform' ) !== null ) {
document.getElementById( 'wpSave' ).onclick = teahouseHandler;
}
} );
function teahouseHandler() {
if ( !( document.getElementById( 'wpMinoredit' ).checked ) ) {
alert( 'Remember to leave a Teahouse Talkback template!' );
}
}
*/
/* Teahouse talkback link */
/* NOTES:
* Only apply TB link to signatures and templates that wrap links in ()
* Detect signature section character separator and mimic it to make it look less "inserted"
**/
// importScript( 'User:Technical 13/Scripts/teahouseTalkbackLink.js' );// [[User:Technical 13/Scripts/teahouseTalkbackLink.js]]
/* You've installed all of the Teahouse scripts, so you no longer need the little box to remind you to add the scripts! */
$( 'div#template-navbar' ).remove();
/* Widen the wishlist box so it is not a tall column of only a dozen characters wide */
$( 'div#TH-Wishlist-container' ).css( { "float": "none", "width": "900px" } );
$( 'div#TH-Wishlist' ).css( { "float": "none", "width": "898px" } );