code
stringlengths
1
2.08M
language
stringclasses
1 value
require.config({ paths: { jQuery: "libs/jquery-1.8.1.min", "jQuery-ui": "libs/jquery-ui-1.10.2.custom.min", kendo: "libs/kendo.web.min", drag: "libs/jquery.event.drag-2.0", lte: "libs/lte-ie7", kineticJs: "libs/kinetic-v4.5.1.min", iframeTransport: "libs/jquery.iframe-transport", ...
JavaScript
var App; var console={}; console.log = function() {}; require(["./common-player"], function (common) { require(["app/app-player", "kendo"], function (application) { App = application; App.init(); }); });
JavaScript
require.config({ paths: { jQuery: "libs/jquery-1.8.1.min", "jQuery-ui": "libs/jquery-ui-1.10.2.custom.min", kendo: "libs/kendo.web.min", lte: "libs/lte-ie7", dtpicker: "libs/jquery.dtpicker", }, waitSeconds: 60, urlArgs: "bust=" + (new Date()).getTime(), shim: { jQ...
JavaScript
var express = require('express'); var app = express(); // var http = require('http').createServer(app).listen(1400); var xx = app.listen(1400); var io = require('socket.io').listen(xx); // usernames which are currently connected to the chat var usernames = {}; io.sockets.on('connection', function (socket...
JavaScript
(function() { var io; var room = []; var locked_object = []; var users = []; var idle = 0; function findLockedData(roomId) { for(var i=0;i<locked_object.length;i++) { if(locked_object[i].roomId == roomId) { return locked_object[i]; } } return false; } io = require('s...
JavaScript
// NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT // IT'S ALL JUST JUNK FOR OUR DOCS! // ++++++++++++++++++++++++++++++++++++++++++ !function ($) { $(function(){ var $window = $(window) // Disable certain links in docs $('section [href^=#]').click(function (e) { e.preventDefault() }) // sid...
JavaScript
/* Holder - 1.9 - client side image placeholders (c) 2012-2013 Ivan Malopinsky / http://imsky.co Provided under the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0 Commercial use requires attribution. */ var Holder = Holder || {}; (function (app, win) { var preempted = false, fallback = false, canva...
JavaScript
/** * Creates a new Floor. * @constructor * @param {google.maps.Map=} opt_map */ function Floor(opt_map) { /** * @type Array.<google.maps.MVCObject> */ this.overlays_ = []; /** * @type boolean */ this.shown_ = true; if (opt_map) { this.setMap(opt_map); } } /** * @param {google.maps.M...
JavaScript
/** * Creates a new level control. * @constructor * @param {IoMap} iomap the IO map controller. * @param {Array.<string>} levels the levels to create switchers for. */ function LevelControl(iomap, levels) { var that = this; this.iomap_ = iomap; this.el_ = this.initDom_(levels); google.maps.event.addList...
JavaScript
/** * @license * * Copyright 2011 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable l...
JavaScript
// Copyright 2011 Google /** * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in wri...
JavaScript
/* * Copyright 2008 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in w...
JavaScript
var langList = [ {name:'en', charset:'UTF-8'}, {name:'zh-cn', charset:'gb2312'}, {name:'zh-tw', charset:'GBK'} ]; var skinList = [ {name:'default', charset:'gb2312'}, {name:'whyGreen', charset:'gb2312'} ];
JavaScript
var $lang={ errAlertMsg: "Invalid date or the date out of range,redo or not?", aWeekStr: ["wk", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], aMonStr: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], clearStr: "Clear", todayStr: "Today", okStr: "OK", updateStr: "OK", tim...
JavaScript
jQuery.fn.center = function () { this.css("position","absolute"); this.css("top", (($(window).height() - this.outerHeight()) / 2) + $(window).scrollTop() + "px"); this.css("left", (($(window).width() - this.outerWidth()) / 2) + $(window).scrollLeft() + "px"); return this; } $(function(){ ...
JavaScript
$(function() {tip $(window.parent.document).find("#contentTitle").text("期间缴费"); $("#SaveCondition").button(); $("#UploadFile").button(); $.fx.speeds._default = 1000; $( "#dialog" ).dialog({ autoOpen: false, closeOnEscape: false, bgiframe: true, modal: true, d...
JavaScript
var langList = [ {name:'en', charset:'UTF-8'}, {name:'zh-cn', charset:'gb2312'}, {name:'zh-tw', charset:'GBK'} ]; var skinList = [ {name:'default', charset:'gb2312'}, {name:'whyGreen', charset:'gb2312'} ];
JavaScript
var $lang={ errAlertMsg: "Invalid date or the date out of range,redo or not?", aWeekStr: ["wk", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], aMonStr: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], clearStr: "Clear", todayStr: "Today", okStr: "OK", updateStr: "OK", tim...
JavaScript
/*! Copyright 2011, Ben Lin (http://dreamerslab.com/) * Licensed under the MIT License (LICENSE.txt). * * Version: 1.0.2 * * Requires: jQuery 1.2.3+ */ ;( function( $ ){ $.preload = function(){ var tmp = [], i = arguments.length; // reverse loop run faster for( ; i-- ; ) tmp.push( $( '<img />' ).attr( 'sr...
JavaScript
var g = jQuery.noConflict(); g(function() { g("#Previous").button(); g("#SaveCondition").button(); g("#UploadFile").button(); g(window.parent.document).find("#contentTitle").text("条件设置"); g.fx.speeds._default = 1000; g( "#dialog" ).dialog({ autoOpen: false, closeOnEscape: false, bgiframe: tr...
JavaScript
// JScript 文件 $(function() { $( "#dialog:ui-dialog" ).dialog( "destroy" ); $(window.parent.document).find("#contentTitle").text("用户管理>查看"); $("#QueryUser").button(); $("#BtnCancel").button().click(function(){ $("#AddUserDiv").dialog("close"); }); $("#AddUserDiv").dialog({...
JavaScript
var supersleight = function() { var root = false; var applyPositioning = true; // Path to a transparent GIF image var shim = '../JavaScript/x.gif'; // RegExp to match above GIF image name var shim_pattern = /x\.gif$/i; var fnLoadPngs = function() { if (root) { root = document.getElementById(r...
JavaScript
// JScript 文件 Ext.onReady(function(){ Ext.BLANK_IMAGE_URL = "../JavaScript/Ext/resources/default/s.gif"; Ext.QuickTips.init(); var item1 = Ext.create('Ext.Panel', { title: '查询终端', contentEl: 'queryMenu', iconCls:'query', allowBlank:true }); var item2...
JavaScript
/** * JavaScript for supporting functionality in Special:Ask * * @see http://www.semantic-mediawiki.org/wiki/Help:Special:Ask * * @since 1.8 * @release 0.1 * * @file * @ingroup SMW * * @licence GNU GPL v2 or later * @author: Jeroen De Dauw <jeroendedauw at gmail dot com> * @author mwjames */ ( function( $...
JavaScript
/** * JavaScript for SMW autocomplete functionality * * @see https://www.mediawiki.org/wiki/Extension:Semantic_MediaWiki * * @since 1.8 * @release 0.1 * * @file * @ingroup SMW * * @licence GNU GPL v2 or later * @author mwjames */ ( function( mw, $ ) { "use strict"; /*global mediaWiki:true*/ /** * Def...
JavaScript
/** * JavaScript for Special:Browse related functions * * @see https://www.mediawiki.org/wiki/Extension:Semantic_MediaWiki * @licence: GNU GPL v2 or later * * @since: 1.7 * @release: 0.2 * * @author Jeroen De Dauw <jeroendedauw at gmail dot com> * @author Devayon Das * @author mwjames */ ( function( $, mw )...
JavaScript
/** * JavaScript for property related functions * * @see https://www.mediawiki.org/wiki/Extension:Semantic_MediaWiki * * @since 1.8 * @release 0.1 * * @file * @ingroup SMW * * @licence GNU GPL v2 or later * @author mwjames */ ( function( $, mw ) { $( document ).ready( function() { // Used in SMW_Spec...
JavaScript
/*! qTip2 - Pretty powerful tooltips - v2.0.0 - 2012-09-10 * http://craigsworks.com/projects/qtip2/ * Copyright (c) 2012 Craig Michael Thompson; Licensed MIT, GPL */ /*jslint browser: true, onevar: true, undef: true, nomen: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: true */ /*global window: ...
JavaScript
/** * JavaScript for SMW tooltip functions * @see http://www.semantic-mediawiki.org/wiki/Help:Tooltip * * @since 1.8 * @release 0.3.1 * * @file * @ingroup SMW * * @licence GNU GPL v2 or later * @author mwjames */ ( function( $, mw, smw ) { "use strict"; /*global mediaWiki:true semanticMediaWiki:true*/ ...
JavaScript
/** * JavaScript for Semantic MediaWiki. * @see http://semantic-mediawiki.org/ * * @licence GNU GPL v3 or later * @author Jeroen De Dauw <jeroendedauw at gmail dot com> */ window.semanticMediaWiki = new( function() { this.log = function( message ) { if ( typeof mediaWiki === 'undefined' ) { if ( typeof ...
JavaScript
/** * Collapsible tabs for Vector */ jQuery( function ( $ ) { var rtl = $( 'body' ).is( '.rtl' ); // Overloading the moveToCollapsed function to animate the transition $.collapsibleTabs.moveToCollapsed = function ( ele ) { var $moving = $( ele ); //$.collapsibleTabs.getSettings( $( $.collapsibleTabs.getS...
JavaScript
/* * Expandable search for Vector */ jQuery( document ).ready( function ( $ ) { /* Browser Support */ var map = { // Left-to-right languages ltr: { // Collapsible Nav is broken in Opera < 9.6 and Konqueror < 4 msie: [['>=', 8]], blackberry: false, ipod: false, iphone: false, ps3: false },...
JavaScript
( function( $ ) { // Small jQuery plugin to handle the toggle function & cookie for state // For collapsible items in the footer $.fn.footerCollapsibleList = function( config ) { if ( ! ( 'title' in config ) || ! ( 'name' in config ) ) { return; } return this.each( function () { // Setup $( th...
JavaScript
/* * Footer cleanup for Vector */ ( function ( $ ) { // Wait for onload to remove edit help and "|" after cancel link. window.onload = function() { // Only if advanced editor is found. if ( 'wikiEditor' in $ ) { $( '.editButtons' ).find( '.editHelp' ).remove(); // Remove the "|" from after the cancelLink...
JavaScript
/* * Edit warning for Vector */ ( function ( mw, $ ) { $(document).ready( function () { // Check if EditWarning is enabled and if we need it if ( $( '#wpTextbox1' ).length === 0 ) { return true; } // Get the original values of some form elements $( '#wpTextbox1, #wpSummary' ).each( function () { $(th...
JavaScript
/* * Section Edit Links for Vector */ ( function ( $, mw ) { var eventBase = 'ext.vector.sectionEditLinks-bucket:'; var cookieBase = 'ext.vector.sectionEditLinks-'; var bucket = null; if ( mw.config.get( 'wgVectorSectionEditLinksBucketTest', false ) ) { // If the version in the client's cookie doesn't match wgVect...
JavaScript
/** * Collapisble navigation for Vector */ ( function ( mw, $ ) { "use strict"; var map, version; // Use the same function for all navigation headings - don't repeat function toggle( $element ) { $.cookie( 'vector-nav-' + $element.parent().attr( 'id' ), $element.parent().is( '.collapsed' ), { 'expires...
JavaScript
/*======================================================================*\ || #################################################################### || || # Asirra module for ConfirmEdit by Bachsau # || || # ---------------------------------------------------------------- # || || # This code is re...
JavaScript
/** * SF_autogrow.js * * Allows for 'autogrow' textareas. Based heavily on the 'Autogrow Textarea * Plugin' by Jevin O. Sewaruth: * http://www.technoreply.com/autogrow-textarea-plugin/ * * Some modifications were made for the code to better work with Semantic * Forms. * * @author Jevin O. Sewaruth * @author ...
JavaScript
/** * SemanticForms.js * * Javascript utility functions for the Semantic Forms extension. * * @author Yaron Koren * @author Sanyam Goyal * @author Stephan Gambke * @author Jeffrey Stuckman * @author Harold Solbrig * @author Eugene Mednikov */ /** * combobox() */ (function(jQuery) { jQuery.widget("ui.comb...
JavaScript
/** * JavaScript for the Semantic Forms MediaWiki extension. * * @licence GNU GPL v3+ * @author Jeroen De Dauw <jeroendedauw at gmail dot com> */ (function( $ ) { var _this = this; this.getPreviewImage = function( args, callback ) { $.getJSON( mw.config.get( 'wgScriptPath' ) + '/api.php', { 'action...
JavaScript
/** * Javascript handler for the autoedit parser function * * @author Stephan Gambke */ /*global jQuery, mediaWiki */ /*global confirm */ ( function ( $, mw ) { 'use strict'; var autoEditHandler = function handleAutoEdit(){ if ( mw.config.get( 'wgUserName' ) === null && ! confirm( mw.msg( 'sf_autoedit_a...
JavaScript
/** * Handles dynamic Page Preview for Semantic Forms. * * @author Stephan Gambke */ /*global jQuery, mediaWiki */ /*global validateAll */ ( function ( $, mw ) { 'use strict'; var form; var previewpane; var previewHeight; /** * Called when the content is loaded into the preview pane */ var loadFrameH...
JavaScript
/** * Javascript code to be used with extension SemanticForms for popup forms. * * @author Stephan Gambke * */ // initialise jQuery( function() { // register eventhandlers on 'edit' links and buttons // register formlink with link jQuery('a.popupformlink').click(function(evt){ return ext.popupform.handlePo...
JavaScript
/** * Javascript handler for the save-and-continue button * * @author Stephan Gambke */ /*global jQuery, mediaWiki */ /*global validateAll */ ( function ( $, mw ) { 'use strict'; var sacButtons; var form; function setChanged( event ) { sacButtons .removeAttr( 'disabled' ) .addClass( 'sf-save_and_cont...
JavaScript
/** * SF_collapsible.js * * Allows for collapsible fieldsets. * * Based on the 'coolfieldset' jQuery plugin: * http://w3shaman.com/article/jquery-plugin-collapsible-fieldset */ function sfHideFieldsetContent(obj, options){ obj.find('div').slideUp(options.speed); obj.removeClass("sfExpandedFieldset"); obj.add...
JavaScript
// create ext if it does not exist yet if ( typeof( window.ext ) === "undefined" ) { window.ext = {}; } window.ext.wikieditor = { // initialize the wikieditor on the specified element init : function init ( input_id, params ) { jQuery( function() { if ( window.mediaWiki ) { var input = jQuery( '#' + input_i...
JavaScript
/** * JavaScript for the Nuke MediaWiki extension. * @see https://www.mediawiki.org/wiki/Extension:Nuke * * @licence GNU GPL v2 or later * @author Jeroen De Dauw <jeroendedauw at gmail dot com> */ (function( $, mw ) { $( document ).ready( function() { function selectPages( check ) { $( 'input[type=checkbox]...
JavaScript
/* * JavaScript for WikiEditor Templates */ $( document ).ready( function () { // Disable for template namespace if ( mw.config.get( 'wgNamespaceNumber' ) === 10 ) { return true; } // Add templates module $( '#wpTextbox1' ).wikiEditor( 'addModule', 'templates' ); } );
JavaScript
/* TemplateEditor module for wikiEditor */ ( function( $ ) { $.wikiEditor.modules.templateEditor = { /** * Name mappings, dirty hack which will be removed once "TemplateInfo" extension is more fully supported */ 'nameMappings': { //keep these all lowercase to navigate web of redirects "infobox skyscraper": "buildi...
JavaScript
/* Highlight module for wikiEditor */ ( function ( $ ) { $.wikiEditor.modules.highlight = { /** * Core Requirements */ req: [ 'iframe' ], /** * Configuration */ cfg: { styleVersion: 3 }, /** * Internally used event handlers */ evt: { delayedChange: function ( context, event ) { if ( event...
JavaScript
/* * JavaScript for WikiEditor Highlighting */ $( document ).ready( function() { // Add highlight module $( '#wpTextbox1' ).wikiEditor( 'addModule', 'highlight' ); } );
JavaScript
// THIS FILE HAS BEEN MODIFIED for use with the mediawiki wikiEditor // It no longer requires etherpad.collab.ace.easysync2.Changeset // THIS FILE WAS ORIGINALLY AN APPJET MODULE: etherpad.collab.ace.contentcollector /** * Copyright 2009 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License")...
JavaScript
/* IFrame extension for wikiEditor */ ( function( $ ) { $.wikiEditor.extensions.iframe = function( context ) { /* * Event Handlers * * These act as filters returning false if the event should be ignored or returning true if it should be passed * on to all modules. This is also where we can attach some extra infor...
JavaScript
/** * Configuration of Dialog module for wikiEditor */ ( function ( $, mw ) { $.wikiEditor.modules.dialogs.config = { replaceIcons: function ( $textarea ) { $textarea .wikiEditor( 'removeFromToolbar', { section: 'main', group: 'insert', tool: 'xlink' } ) .wikiEditor( 'removeFromToolbar', { section: 'main',...
JavaScript
/** * Dialog Module for wikiEditor */ ( function ( $, mw ) { $.wikiEditor.modules.dialogs = { /** * Compatability map */ browsers: { // Left-to-right languages ltr: { msie: [['>=', 7]], // jQuery UI appears to be broken in FF 2.0 - 2.0.0.4 firefox: [ ['>=', 2], ['!=', '2.0'], ['!=', '2.0.0.1'...
JavaScript
/* * JavaScript for WikiEditor Toolbar */ $( document ).ready( function() { if ( !$.wikiEditor.isSupported( $.wikiEditor.modules.toolbar ) ) { $( '.wikiEditor-oldToolbar' ).show(); return; } // The old toolbar is still in place and needs to be removed so there aren't two toolbars $( '#toolbar' ).remove(); /...
JavaScript
/* * JavaScript for WikiEditor Dialogs */ $( document ).ready( function() { if ( !$.wikiEditor.isSupported( $.wikiEditor.modules.dialogs ) ) { return; } // Replace icons $.wikiEditor.modules.dialogs.config.replaceIcons( $( '#wpTextbox1' ) ); // Add dialogs module $( '#wpTextbox1' ).wikiEditor( 'addModule...
JavaScript
/* * JavaScript for WikiEditor Template Editor */ $( document ).ready( function () { // Disable in template namespace if ( mw.config.get( 'wgNamespaceNumber' ) === 10 ) { return true; } // Add template editor module $( 'textarea#wpTextbox1' ).wikiEditor( 'addModule', 'templateEditor' ); });
JavaScript
/* Templates Module for wikiEditor */ ( function( $ ) { $.wikiEditor.modules.templates = { /** * Core Requirements */ 'req': [ 'iframe' ], /** * Object Templates */ 'tpl': { 'marker': { 'type': 'template', 'anchor': 'wrap', 'skipDivision': 'realchange', 'afterWrap': function( node ) { $( node ).addClas...
JavaScript
/** * Test set for the edit toolbar */ var textareaId = '#wpTextbox1'; var wikiEditorTests = { // Add emoticons section add_sections_toolbar: { call: 'addToToolbar', data: { 'sections': { 'emoticons': { 'type': 'toolbar', 'label': 'Emoticons' } } }, test: '*[rel=emoticons].section', ...
JavaScript
/** * Configuration of Toolbar module for wikiEditor */ ( function( $ ) { $.wikiEditor.modules.toolbar.config = { getDefaultConfig: function() { var fileNamespace = mw.config.get( 'wgFormattedNamespaces' )[6]; return { 'toolbar': { // Main section 'main': { 'type': 'toolbar', 'groups': { 'format': { ...
JavaScript
/* * Remove the signature button if the main namespace is edited. */ $( document ).ready( function() { // This module is designed not to depend on ext.wikiEditor or jquery.wikiEditor. // Removing this dependency fixed various bugs, but it does mean that we have to // account for the situation where $.wikiEditor is...
JavaScript
/* Publish module for wikiEditor */ ( function ( $ ) { $.wikiEditor.modules.publish = { /** * Compatability map */ browsers: { // Left-to-right languages ltr: { msie: [['>=', 7]], firefox: [['>=', 3]], opera: [['>=', 9.6]], safari: [['>=', 4]] }, // Right-to-left languages rtl: { msie: [['>=', 8]], ...
JavaScript
/* Publish module for wikiEditor */ ( function( $ ) { $.wikiEditor.modules.previewDialog = { /** * Compatability map */ 'browsers': { // Left-to-right languages 'ltr': { 'msie': [['>=', 7]], 'firefox': [['>=', 3]], 'opera': [['>=', 9.6]], 'safari': [['>=', 4]] }, // Right-to-left languages 'rtl': { 'm...
JavaScript
/* Preview module for wikiEditor */ ( function ( $, mw ) { $.wikiEditor.modules.preview = { /** * Compatability map */ browsers: { // Left-to-right languages ltr: { msie: [['>=', 7]], firefox: [['>=', 3]], opera: [['>=', 9.6]], safari: [['>=', 4]] }, // Right-to-left languages rtl: { msie: [['>=', 8]...
JavaScript
/** * Toolbar module for wikiEditor */ ( function( $ ) { $.wikiEditor.modules.toolbar = { /** * API accessible functions */ api : { addToToolbar : function( context, data ) { var smooth = true, type, i; for ( type in data ) { switch ( type ) { case 'sections': var $sections = context.modules.too...
JavaScript
/* * JavaScript for WikiEditor Publish module */ $( document ).ready( function() { // Add publish module $( '#wpTextbox1' ).wikiEditor( 'addModule', 'publish' ); } );
JavaScript
/** * This plugin provides a way to build a wiki-text editing user interface around a textarea. * * @example To intialize without any modules: * $( 'div#edittoolbar' ).wikiEditor(); * * @example To initialize with one or more modules, or to add modules after it's already been initialized: * $( 'textarea#...
JavaScript
/* * JavaScript for WikiEditor Preview Dialog */ $( document ).ready( function() { // Add preview module $( 'textarea#wpTextbox1' ).wikiEditor( 'addModule', 'previewDialog' ); } );
JavaScript
/* * JavaScript for WikiEditor */ $( document ).ready( function() { // Initialize wikiEditor $( '#wpTextbox1' ).wikiEditor(); } );
JavaScript
/* TOC Module for wikiEditor */ ( function( $ ) { $.wikiEditor.modules.toc = { /** * Compatability map */ 'browsers': { // Left-to-right languages 'ltr': { 'msie': [['>=', 7]], 'firefox': [['>=', 3]], 'opera': [['>=', 10]], 'safari': [['>=', 4]], 'chrome': [['>=', 4]] }, // Right-to-left languages 'rt...
JavaScript
/* * JavaScript for WikiEditor Preview module */ $( document ).ready( function() { // Add preview module $( 'textarea#wpTextbox1' ).wikiEditor( 'addModule', 'preview' ); } );
JavaScript
/* * JavaScript for WikiEditor Table of Contents */ $( document ).ready( function() { // Add table of contents module $( '#wpTextbox1' ).wikiEditor( 'addModule', 'toc' ); } );
JavaScript
/** * Vector-specific scripts */ jQuery( function ( $ ) { $( 'div.vectorMenu' ).each( function () { var $el = $( this ); $el.find( 'h5:first a:first' ) // For accessibility, show the menu when the hidden link in the menu is clicked (bug 24298) .click( function ( e ) { $el.find( '.menu:first' ).toggleCl...
JavaScript
// IE fixes javascript window.isMSIE55 = ( window.showModalDialog && window.clipboardData && window.createPopup ); window.doneIETransform = undefined; window.doneIEAlphaFix = undefined; window.hookit = function() { if ( !doneIETransform && document.getElementById && document.getElementById( 'bodyContent' ) ) { don...
JavaScript
( function ( mw, $ ) { var ajaxUploadDestCheck = mw.config.get( 'wgAjaxUploadDestCheck' ), fileExtensions = mw.config.get( 'wgFileExtensions' ); window.licenseSelectorCheck = function() { var selector = document.getElementById( "wpLicense" ); var selection = selector.options[selector.selectedIndex].value; if( sele...
JavaScript
( function ( $ ) { $( document ).ready( function () { var $label, labelText; function syncText() { var value = $(this).val() .replace( /[\[\]\{\}|#<>%+? ]/g, '_' ) .replace( /&/, '&amp;' ) .replace( /__+/g, '_' ) .replace( /^_+/, '' ) .replace( /_+$/, '' ); value = value.substr( 0, 1 ).t...
JavaScript
window.ProtectionForm = { 'existingMatch': false, /** * Set up the protection chaining interface (i.e. "unlock move permissions" checkbox) * on the protection form * * @param opts Object : parameters with members: * tableId Identifier of the table containing UI bits * labelText ...
JavaScript
// remote scripting library // (c) copyright 2005 modernmethod, inc window.sajax_debug_mode = false; window.sajax_request_type = 'GET'; /** * if sajax_debug_mode is true, this function outputs given the message into * the element with id = sajax_debug; if no such element exists in the document, * it is injected. ...
JavaScript
/** * MediaWiki legacy wikibits */ ( function ( mw ) { window.clientPC = navigator.userAgent.toLowerCase(); // Get client info window.is_gecko = /gecko/.test( clientPC ) && !/khtml|spoofer|netscape\/7\.0/.test(clientPC); window.is_safari = window.is_safari_win = window.webkit_version = window.is_chrome = window.i...
JavaScript
/** * Top level namespace for Jasmine, a lightweight JavaScript BDD/spec/testing framework. * * @namespace */ var jasmine = {}; /** * @private */ jasmine.unimplementedMethod_ = function() { throw new Error("unimplemented method"); }; /** * Use <code>jasmine.undefined</code> instead of <code>undefined</code>,...
JavaScript
jasmine.TrivialReporter = function(doc) { this.document = doc || document; this.suiteDivs = {}; this.logRunningSpecs = false; }; jasmine.TrivialReporter.prototype.createDom = function(type, attrs, childrenVarArgs) { var el = document.createElement(type); for (var i = 2; i < arguments.length; i++) { var ...
JavaScript
( function ( $, mw, QUnit, undefined ) { /*global CompletenessTest */ /*jshint evil:true */ 'use strict'; var mwTestIgnore, mwTester, addons; /** * Add bogus to url to prevent IE crazy caching * * @param value {String} a relative path (eg. 'data/foo.js' * or 'data/test.php?foo=bar'). * @return {String} Such as '...
JavaScript
mw.loader.testCallback();
JavaScript
QUnit.start(); QUnit.assert.ok( true, 'Successfully loaded!');
JavaScript
/* * JavaScript for Special:Search */ ( function( $, mw ) { $( function() { // Emulate HTML5 autofocus behavior in non HTML5 compliant browsers if ( !( 'autofocus' in document.createElement( 'input' ) ) ) { $( 'input[autofocus]:first' ).focus(); } // Create check all/none button var $checkboxes = $('#powersearch i...
JavaScript
/* JavaScript for Special:Block */ jQuery( function( $ ) { var DO_INSTANT = true, $blockTarget = $( '#mw-bi-target' ), $anonOnlyRow = $( '#mw-input-wpHardBlock' ).closest( 'tr' ), $enableAutoblockRow = $( '#mw-input-wpAutoBlock' ).closest( 'tr' ), $hideUser = $( '#mw-input-wpHideUser' ).closest( 'tr' ), $w...
JavaScript
/* * JavaScript for Specical:Undelete */ jQuery( document ).ready( function( $ ) { $( '#mw-undelete-invert' ).click( function( e ) { e.preventDefault(); $( '#undelete' ).find( 'input:checkbox' ) .prop( 'checked', function( i, val ) { return !val; } ); } ); } );
JavaScript
/* JavaScript for Special:RecentChanges */ ( function ( mw, $ ) { var checkboxes = [ 'nsassociated', 'nsinvert' ]; /** * @var select {jQuery} */ var $select = null; var rc = mw.special.recentchanges = { /** * Handler to disable/enable the namespace selector checkboxes when the * special 'all' namesp...
JavaScript
/** * JavaScript for Special:JavaScriptTest */ ( function ( mw, $ ) { $( function () { // Create useskin dropdown menu and reload onchange to the selected skin // (only if a framework was found, not on error pages). $( '#mw-javascripttest-summary.mw-javascripttest-frameworkfound' ).append( function () { v...
JavaScript
/** * JavaScript for Special:Upload * Note that additional code still lives in skins/common/upload.js */ ( function ( mw, $ ) { /** * Add a preview to the upload form */ $( function ( $ ) { /** * Is the FileAPI available with sufficient functionality? */ function hasFileAPI() { return typeof windo...
JavaScript
/* JavaScript for Special:MovePage */ jQuery( function( $ ) { $( '#wpReason, #wpNewTitleMain' ).byteLimit(); });
JavaScript
mw.special = {};
JavaScript
/* * JavaScript for Special:ChangeEmail */ ( function ( mw, $ ) { /** * Given an email validity status (true, false, null) update the label CSS class */ function updateMailValidityLabel( mail ) { var isValid = mw.util.validateEmail( mail ), $label = $( '#mw-emailaddress-validity' ); // We allow empty address ...
JavaScript
/* * JavaScript for Special:Preferences */ jQuery( document ).ready( function ( $ ) { $( '#prefsubmit' ).attr( 'id', 'prefcontrol' ); var $preftoc = $('<ul id="preftoc"></ul>'); var $preferences = $( '#preferences' ) .addClass( 'jsprefs' ) .before( $preftoc ); var $fieldsets = $preferences.children( 'fieldset' ) ...
JavaScript
( function ( mw, $ ) { mw.page = {}; // Client profile classes for <html> // Allows for easy hiding/showing of JS or no-JS-specific UI elements $( 'html' ) .addClass('client-js' ) .removeClass( 'client-nojs' ); // Initialize utilities as soon as the document is ready (mw.util.$content, // messageBoxNew, pr...
JavaScript
jQuery( document ).ready( function( $ ) { /* Emulate placeholder if not supported by browser */ if ( !( 'placeholder' in document.createElement( 'input' ) ) ) { $( 'input[placeholder]' ).placeholder(); } /* Enable makeCollapsible */ $( '.mw-collapsible' ).makeCollapsible(); /* Lazy load jquery.tablesorter */...
JavaScript
/** * Animate watch/unwatch links to use asynchronous API requests to * watch pages, rather than navigating to a different URI. */ ( function ( mw, $ ) { /** * The name of the page to watch or unwatch. */ var title = mw.config.get( 'wgRelevantPageName', mw.config.get( 'wgPageName' ) ); /** * Update the lin...
JavaScript
/* This is cldrpluralparser 1.0, ported to MediaWiki ResourceLoader */ /** * cldrpluralparser.js * A parser engine for CLDR plural rules. * * Copyright 2012 GPLV3+, Santhosh Thottingal * * @version 0.1.0-alpha * @source https://github.com/santhoshtr/CLDRPluralRuleParser * @author Santhosh Thottingal <santhosh.thotting...
JavaScript