Difference between revisions 116764 and 116771 on orwiki/* _____________________________________________________________________________ * | | * | === WARNING: GLOBAL GADGET FILE === | * | Changes to this page affect many users. | * | Please discuss changes on the talk page or on [[WT:Gadget]] before editing. | * |_____________________________________________________________________________| * (contracted; show full) }) .click( function(e) { e.preventDefault(); var title = $form.find('#wp-th-question-title').val(); var text = $form.find('#wp-th-question-text').val(); if ( title && / \s*$/.test(text) ) { mw.teahouse.addQuestion( title, text ); } }) .end() .find('#wp-th-question-text') .keypress( function(e) { var $textbox = $(this); setTimeout( function() { if ( (/ \s*$/).test($textbox.val()) ) { $form.find('#wp-th-question-ask') .button( 'option','disabled', false ); } else { $form.find('#wp-th-question-ask') .button( 'option','disabled', true ); } }, 0 ); } ); $('.wp-teahouse-ask').click(function(e) { $form.toggle('fast'); e.cancelBubble = true; // for IE if (e.stopPropagation) { e.stopPropagation(); e.preventDefault(); } }); $(document).click( function(e) { var $target = $(e.target); if ( ! $target.is('.wp-teahouse-question-form *') && ! $target.is('.wp-teahouse-ask *') ) { $('.wp-teahouse-question-form').fadeOut(); } } ); $(document).keydown( function(e) { if ( e.keyCode == 27 ) {// ESC $('.wp-teahouse-question-form').fadeOut(); } }); } ); } ); } )(jQuery,mediaWiki); //</nowiki> All content in the above text box is licensed under the Creative Commons Attribution-ShareAlike license Version 4 and was originally sourced from https://or.wikipedia.org/w/index.php?diff=prev&oldid=116771.
![]() ![]() This site is not affiliated with or endorsed in any way by the Wikimedia Foundation or any of its affiliates. In fact, we fucking despise them.
|