code stringlengths 1 2.08M | language stringclasses 1
value |
|---|---|
/* This is JsJpegMeta 1.0, ported to MediaWiki ResourceLoader by Bryan Tong Minh */
/* The following lines where changed with respect to the original: 54, 625-627 */
(function( $ ) {
/* JsJpegMeta starts here */
/*
Copyright (c) 2009 Ben Leslie
Permission is hereby granted, free of charge, to any person obtai... | JavaScript |
/**
* Additional mw.Api methods to assist with (un)watching wiki pages.
* @since 1.19
*/
( function ( mw, $ ) {
/**
* @context {mw.Api}
*/
function doWatchInternal( page, success, err, addParams ) {
var params = {
action: 'watch',
title: String( page ),
token: mw.user.tokens.get( 'watchToken' ),
... | JavaScript |
/**
* Additional mw.Api methods to assist with API calls related to categories.
*/
( function ( mw, $ ) {
$.extend( mw.Api.prototype, {
/**
* Determine if a category exists.
* @param title {mw.Title}
* @param success {Function} callback to pass boolean of category's existence
* @param err {Function} o... | JavaScript |
/**
* Additional mw.Api methods to assist with API calls to the API module of the TitleBlacklist extension.
*/
( function ( mw, $ ) {
$.extend( mw.Api.prototype, {
/**
* Convinience method for 'action=titleblacklist'.
* Note: This action is not provided by MediaWiki core, but as part of the TitleBlacklist ... | JavaScript |
/**
* Additional mw.Api methods to assist with API calls related to editing wiki pages.
*/
( function ( mw, $ ) {
// Cache token so we don't have to keep fetching new ones for every single request.
var cachedToken = null;
$.extend( mw.Api.prototype, {
/**
* Post to API with edit token. If we have no token,... | JavaScript |
/**
* mw.Api objects represent the API of a particular MediaWiki server.
*/
( function ( mw, $ ) {
/**
* @var defaultOptions {Object}
* We allow people to omit these default parameters from API requests
* there is very customizable error handling here, on a per-call basis
* wondering, would it be simpler to... | JavaScript |
/**
* mw.Api methods for parsing wikitext.
*/
( function ( mw, $ ) {
$.extend( mw.Api.prototype, {
/**
* Convinience method for 'action=parse'. Parses wikitext into HTML.
*
* @param wikiText {String}
* @param ok {Function} [optional] deprecated (success callback)
* @param err {Function} [optional] ... | JavaScript |
/**
* Base language object with methods for storing and getting
* language data.
*/
( function ( mw, $ ) {
var language = {
/**
* @var data {Object} Language related data (keyed by language,
* contains instances of mw.Map).
* @example Set data
* <code>
* // Override, extend or create the langu... | JavaScript |
/**
* Localized Language support attempts to mirror some of the functionality of
* Language.php in MediaWiki.
* This adds methods for transforming message text.
*/
( function ( mw, $ ) {
var language = {
/**
* Process the PLURAL template substitution
*
* @param {object} template Template object
* @format... | JavaScript |
/**
* Hungarian language functions
* @author Santhosh Thottingal
*/
mediaWiki.language.convertGrammar = function( word, form ) {
var grammarForms = mw.language.getData( 'hu', 'grammarForms' );
if ( grammarForms && grammarForms[form] ) {
return grammarForms[form][word] ;
}
switch ( form ) {
case 'rol':
... | JavaScript |
/**
* Upper Sorbian (Hornjoserbsce) language functions
*/
mediaWiki.language.convertGrammar = function( word, form ) {
var grammarForms =mw.language.getData( 'hsb', 'grammarForms' );
if ( grammarForms && grammarForms[form] ) {
return grammarForms[form][word] ;
}
switch ( form ) {
case 'instrumental': // inst... | JavaScript |
/**
* Russian (Русский) language functions
*/
mediaWiki.language.convertGrammar = function( word, form ) {
var grammarForms = mw.language.getData( 'ru', 'grammarForms' );
if ( grammarForms && grammarForms[form] ) {
return grammarForms[form][word] ;
}
switch ( form ) {
case 'genitive': // родительный падеж
... | JavaScript |
/**
* Armenian (Հայերեն) language functions
*/
mediaWiki.language.convertGrammar = function( word, form ) {
var grammarForms = mw.language.getData( 'hy', 'grammarForms' );
if ( grammarForms && grammarForms[form] ) {
return grammarForms[form][word] ;
}
// These rules are not perfect, but they are currently onl... | JavaScript |
/**
* Finnish (Suomi) language functions
* @author Santhosh Thottingal
*/
mediaWiki.language.convertGrammar = function( word, form ) {
var grammarForms = mw.language.getData( 'fi', 'grammarForms' );
if ( grammarForms && grammarForms[form] ) {
return grammarForms[form][word] ;
}
// vowel harmony flag
var a... | JavaScript |
/**
* Bosnian (bosanski) language functions
*/
mediaWiki.language.convertGrammar = function( word, form ) {
var grammarForms = mw.language.getData( 'bs', 'grammarForms' );
if ( grammarForms && grammarForms[form] ) {
return grammarForms[form][word] ;
}
switch ( form ) {
case 'instrumental': // instrumental
... | JavaScript |
/**
* Hebrew (עברית) language functions
*/
mediaWiki.language.convertGrammar = function( word, form ) {
var grammarForms = mw.language.getData( 'he', 'grammarForms' );
if ( grammarForms && grammarForms[form] ) {
return grammarForms[form][word] ;
}
switch ( form ) {
case 'prefixed':
case 'תחילית': // the sa... | JavaScript |
/**
* Slovenian (Slovenščina) language functions
*/
mediaWiki.language.convertGrammar = function( word, form ) {
var grammarForms = mw.language.getData( 'sl', 'grammarForms' );
if ( grammarForms && grammarForms[form] ) {
return grammarForms[form][word] ;
}
switch ( form ) {
case 'mestnik': // locative
wor... | JavaScript |
/**
* Ossetian (Ирон) language functions
* @author Santhosh Thottingal
*/
mediaWiki.language.convertGrammar = function( word, form ) {
var grammarForms = mw.language.getData( 'os', 'grammarForms' );
if ( grammarForms && grammarForms[form] ) {
return grammarForms[form][word] ;
}
// Ending for allative case
v... | JavaScript |
/**
* Lower Sorbian (Dolnoserbski) language functions
*/
mediaWiki.language.convertGrammar = function( word, form ) {
var grammarForms = mw.language.getData( 'dsb', 'grammarForms' );
if ( grammarForms && grammarForms[form] ) {
return grammarForms[form][word] ;
}
switch ( form ) {
case 'instrumental': // inst... | JavaScript |
/**
* Ukrainian (Українська) language functions
*/
mediaWiki.language.convertGrammar = function( word, form ) {
var grammarForms = mw.language.getData( 'uk', 'grammarForms' );
if ( grammarForms && grammarForms[form] ) {
return grammarForms[form][word] ;
}
switch ( form ) {
case 'genitive': // родовий відміно... | JavaScript |
/**
* Latin (lingua Latina) language functions
* @author Santhosh Thottingal
*/
mediaWiki.language.convertGrammar = function( word, form ) {
var grammarForms = mw.language.getData( 'la', 'grammarForms' );
if ( grammarForms && grammarForms[form] ) {
return grammarForms[form][word] ;
}
switch ( form ) {
case ... | JavaScript |
/**
* Irish (Gaeilge) language functions
*/
mediaWiki.language.convertGrammar = function( word, form ) {
var grammarForms = mw.language.getData( 'ga', 'grammarForms' );
if ( grammarForms && grammarForms[form] ) {
return grammarForms[form][word] ;
}
switch ( form ) {
case 'ainmlae':
switch ( word ) {
c... | JavaScript |
/**
* CLDR related utility methods
*/
( function( mw ) {
"use strict";
var cldr = {
/**
* For the number, get the plural for index
* In case none of the rules passed, we return pluralRules.length
* That means it is the "other" form.
* @param number
* @param pluralRules
* @return plural form in... | JavaScript |
/**
* HTML5 placeholder emulation for jQuery plugin
*
* This will automatically use the HTML5 placeholder attribute if supported, or emulate this behavior if not.
*
* @author Trevor Parscal <tparscal@wikimedia.org>, 2012
* @author Krinkle <krinklemail@gmail.com>, 2012
* @version 0.2.0
* @license GPL v2
*/
( fu... | JavaScript |
/**
* jQuery spinner
*
* Simple jQuery plugin to create, inject and remove spinners.
*/
( function ( $ ) {
// Default options for new spinners,
// stored outside the function to share between calls.
var defaults = {
id: undefined,
size: 'small',
type: 'inline'
};
$.extend({
/**
* Creates a spinner... | JavaScript |
/*!
* jQuery xmlDOM Plugin v1.0
* http://outwestmedia.com/jquery-plugins/xmldom/
*
* Released: 2009-04-06
* Version: 1.0
*
* Copyright (c) 2009 Jonathan Sharp, Out West Media LLC.
* Dual licensed under the MIT and GPL licenses.
* http://docs.jquery.com/License
*/
(function($) {
// IE DOMParser wrapper
if ( ... | JavaScript |
/**
* QUnit v1.10.0 - A JavaScript Unit Testing Framework
*
* http://qunitjs.com
*
* Copyright 2012 jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*/
(function( window ) {
var QUnit,
config,
onErrorFnPrev,
testId = 0,
fileName = (sourceFromStacktrace... | JavaScript |
/**
* These plugins provide extra functionality for interaction with textareas.
*/
( function ( $ ) {
/*jshint noempty:false */
if ( document.selection && document.selection.createRange ) {
// On IE, patch the focus() method to restore the windows' scroll position
// (bug 32241)
$.fn.extend({
focus: ( fun... | JavaScript |
/**
* jQuery makeCollapsible
*
* This will enable collapsible-functionality on all passed elements.
* Will prevent binding twice to the same element.
* Initial state is expanded by default, this can be overriden by adding class
* "mw-collapsed" to the "mw-collapsible" element.
* Elements made collapsible have cl... | JavaScript |
/**
* Plugin that automatically truncates the plain text contents of an element
* and adds an ellipsis.
*/
( function ( $ ) {
var
// Cache ellipsed substrings for every string-width-position combination
cache = {},
// Use a separate cache when match highlighting is enabled
matchTextCache = {};
$.fn.autoEllips... | JavaScript |
/**
* jQuery JSON Plugin
* version: 2.3 (2011-09-17)
*
* This document is licensed as free software under the terms of the
* MIT License: http://www.opensource.org/licenses/mit-license.php
*
* Brantley Harris wrote this plugin. It is based somewhat on the JSON.org
* website's http://www.json.org/json2.js, which... | JavaScript |
/**
* hoverIntent is similar to jQuery's built-in "hover" function except that
* instead of firing the onMouseOver event immediately, hoverIntent checks
* to see if the user's mouse has slowed down (beneath the sensitivity
* threshold) before firing the onMouseOver event.
*
* hoverIntent r5 // 2007.03.27 // jQuery 1.1... | JavaScript |
/**
* TableSorter for MediaWiki
*
* Written 2011 Leo Koppelkamm
* Based on tablesorter.com plugin, written (c) 2007 Christian Bach.
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* Depends on mw.config (wgDigitTra... | JavaScript |
/**
* jQuery Color Utilities
* Written by Krinkle in 2011
* Released under the MIT and GPL licenses.
* Mostly based on other plugins and functions (linted and optimized a little).
* Sources cited inline.
*/
( function ( $ ) {
$.colorUtil = {
// Color Conversion function from highlightFade
// By Blair Mitche... | JavaScript |
/**
* jQuery byteLimit plugin.
*
* @author Jan Paul Posma, 2011
* @author Timo Tijhof, 2011-2012
*/
( function ( $ ) {
/**
* Utility function to trim down a string, based on byteLimit
* and given a safe start position. It supports insertion anywhere
* in the string, so "foo" to "fobaro" if limit is 4 will ... | JavaScript |
/**
* Farbtastic Color Picker 1.2
* © 2008 Steven Wittens
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*... | JavaScript |
/**
* Utility to get all attributes of an element directy as an object.
*
* @author Timo Tijhof, 2011
*/
jQuery.fn.getAttrs = function ( all ) {
var map = this[0].attributes,
attrs = {},
len = map.length,
i, v;
for ( i = 0; i < len; i++ ) {
// IE6 includes *all* allowed attributes for thew element (inclu... | JavaScript |
/**
* jQuery checkboxShiftClick
*
* This will enable checkboxes to be checked or unchecked in a row by clicking one, holding shift and clicking another one
*
* @author Krinkle <krinklemail@gmail.com>
* @license GPL v2
*/
( function ( $ ) {
$.fn.checkboxShiftClick = function ( text ) {
var prevCheckbox = null,... | JavaScript |
/*!
* jQuery Form Plugin
* version: 3.14 (30-JUL-2012)
* @requires jQuery v1.3.2 or later
*
* Examples and documentation at: http://malsup.com/jquery/form/
* Project repository: https://github.com/malsup/form
* Dual licensed under the MIT and GPL licenses:
* http://malsup.github.com/mit-license.txt
* htt... | JavaScript |
/*!
* jQuery Cycle Plugin (with Transition Definitions)
* Examples and documentation at: http://jquery.malsup.com/cycle/
* Copyright (c) 2007-2010 M. Alsup
* Version: 2.9999 (13-NOV-2011)
* Dual licensed under the MIT and GPL licenses.
* http://jquery.malsup.com/license.html
* Requires: jQuery v1.3.2 or later
*... | JavaScript |
/**
* Collapsible tabs jQuery Plugin
*/
( function ( $ ) {
$.fn.collapsibleTabs = function ( options ) {
// return if the function is called on an empty jquery object
if ( !this.length ) {
return this;
}
// Merge options into the defaults
var $settings = $.extend( {}, $.collapsibleTabs.defaults, options... | JavaScript |
/**
* User-agent detection
*/
( function ( $ ) {
/* Private Members */
/**
* @var profileCache {Object} Keyed by userAgent string,
* value is the parsed $.client.profile object for that user agent.
*/
var profileCache = {};
/* Public Methods */
$.client = {
/**
* Get an object containing informat... | JavaScript |
/**
* jQuery arrowSteps plugin
* Copyright Neil Kandalgaonkar, 2010
*
* This work is licensed under the terms of the GNU General Public License,
* version 2 or later.
* (see http://www.fsf.org/licensing/licenses/gpl.html).
* Derivative works and later versions of the code must be free software
* licensed under ... | JavaScript |
/*
* ----------------------------- JSTORAGE -------------------------------------
* Simple local storage wrapper to save data on the browser side, supporting
* all major browsers - IE6+, Firefox2+, Safari4+, Chrome4+ and Opera 10.5+
*
* Copyright (c) 2010 Andris Reinman, andris.reinman@gmail.com
* Project homepag... | JavaScript |
/**
* jQuery.byteLength
*
* Calculate the byte length of a string (accounting for UTF-8).
*
* @author Jan Paul Posma, 2011
*/
jQuery.byteLength = function ( str ) {
// This basically figures out how many bytes a UTF-16 string (which is what js sees)
// will take in UTF-8 by replacing a 2 byte character with 2 ... | JavaScript |
/**
* jQuery Color Animations
*
* @author John Resig, 2007
* @author Krinkle, 2011
* Released under the MIT and GPL licenses.
*
* - 2011-01-05: Forked for MediaWiki. See also jQuery.colorUtil plugin
*/
( function ( $ ) {
function getColor( elem, attr ) {
/*jshint boss:true */
var color;
do {
color =... | JavaScript |
/*
* jQuery Asynchronous Plugin 1.0
*
* Copyright (c) 2008 Vincent Robert (genezys.net)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
*/
(function($){
// opts.delay : (default 10) delay between async call in ms
// opts.bulk : (default 500) delay during which the loop ca... | JavaScript |
/**
* This plugin provides a generic way to add suggestions to a text box.
*
* Usage:
*
* Set options:
* $( '#textbox' ).suggestions( { option1: value1, option2: value2 } );
* $( '#textbox' ).suggestions( option, value );
* Get option:
* value = $( '#textbox' ).suggestions( option );
* Initialize:
* $( '... | JavaScript |
/**
* jQuery tabIndex
*/
( function ( $ ) {
/**
* Finds the lowerst tabindex in use within a selection
*
* @return number Lowest tabindex on the page
*/
$.fn.firstTabIndex = function () {
var minTabIndex = null;
$(this).find( '[tabindex]' ).each( function () {
var tabIndex = parseInt( $(this).prop( ... | JavaScript |
( function ( $ ) {
/**
* Function that escapes spaces in event names. This is needed because
* "_delayedBind-foo bar-1000" refers to two events
*/
function encodeEvent( event ) {
return event.replace( /-/g, '--' ).replace( / /g, '-' );
}
$.fn.extend( {
/**
* Bind a callback to an event in a delayed fashion.
*... | JavaScript |
/**
* Utility to stack stuff in an overlay fixed on the bottom of the page.
*
* Usage:
* <code>
* var hovzer = $.getFootHovzer();
* hovzer.$.append( $myCollection );
* hovzer.update();
* </code>
*
* @author Timo Tijhof, 2012
*/
( function ( $ ) {
var $hovzer, footHovzer, prevHeight, newHeight;
... | JavaScript |
/**
* This plugin provides functionality to expand a text box on focus to double it's current width
*
* Usage:
*
* Set options:
* $('#textbox').expandableField( { option1: value1, option2: value2 } );
* $('#textbox').expandableField( option, value );
* Get option:
* value = $('#textbox').expandableField( op... | JavaScript |
/**
* JavaScript to show jump links to motor-impaired users when they are focused.
*/
jQuery( function( $ ) {
$('.mw-jump').delegate( 'a', 'focus blur', function( e ) {
// Confusingly jQuery leaves e.type as "focusout" for delegated blur events
if ( e.type === "blur" || e.type === "focusout" ) {
$( this ).cl... | JavaScript |
/*!
* MockJax - jQuery Plugin to Mock Ajax requests
*
* Version: 1.4.0
* Released: 2011-02-04
* Source: http://github.com/appendto/jquery-mockjax
* Docs: http://enterprisejquery.com/2010/07/mock-your-ajax-requests-with-mockjax-for-rapid-development
* Plugin: mockjax
* Author: Jonathan Sharp (http://j... | JavaScript |
/*!
* jQuery Cookie Plugin
* https://github.com/carhartl/jquery-cookie
*
* Copyright 2011, Klaus Hartl
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://www.opensource.org/licenses/mit-license.php
* http://www.opensource.org/licenses/GPL-2.0
*/
(function($) {
$.cookie = function(key, value, ... | JavaScript |
/**
* jQuery QUnit CompletenessTest 0.4
*
* Tests the completeness of test suites for object oriented javascript
* libraries. Written to be used in environments with jQuery and QUnit.
* Requires jQuery 1.7.2 or higher.
*
* Built for and tested with:
* - Chrome 19
* - Firefox 4
* - Safari 5
*
* @author Timo ... | JavaScript |
/**
* Simple Placeholder-based Localization
*
* Call on a selection of HTML which contains <html:msg key="message-key" /> elements or elements
* with title-msg="message-key", alt-msg="message-key" or placeholder-msg="message-key" attributes.
* <html:msg /> elements will be replaced with localized text, *-msg attri... | JavaScript |
/*
* JavaScript backwards-compatibility alternatives and other convenience functions
*/
( function ( $ ) {
$.extend({
trimLeft: function ( str ) {
return str === null ? '' : str.toString().replace( /^\s+/, '' );
},
trimRight: function ( str ) {
return str === null ?
'' : str.toString().replace( /\s... | JavaScript |
/*
* jQuery.appear
* http://code.google.com/p/jquery-appear/
*
* Copyright (c) 2009 Michael Hixson
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
*/
(function($) {
$.fn.appear = function(fn, options) {
var settings = $.extend({
//arbitrary data to pass to fn
... | JavaScript |
/**
* jQuery Badge plugin
*
* Based on Badger plugin by Daniel Raftery (http://thrivingkings.com/badger).
*
* @license MIT
*/
/**
* @author Ryan Kaldari <rkaldari@wikimedia.org>, 2012
* @author Andrew Garrett <agarrett@wikimedia.org>, 2012
* @author Marius Hoch <hoo@online.de>, 2012
*
* Permission is hereby... | JavaScript |
/**
* Plugin that highlights matched word partials in a given element.
* TODO: Add a function for restoring the previous text.
* TODO: Accept mappings for converting shortcuts like WP: to Wikipedia:.
*/
( function ( $ ) {
$.highlightText = {
// Split our pattern string at spaces and run our highlight function ... | JavaScript |
/**
* This script provides a function which is run to evaluate whether or not to
* continue loading the jquery and mediawiki modules. This code should work on
* even the most ancient of browsers, so be very careful when editing.
*/
/**
* Returns false when run in a black-listed browser
*
* This function will be ... | JavaScript |
/**
* Experimental advanced wikitext parser-emitter.
* See: http://www.mediawiki.org/wiki/Extension:UploadWizard/MessageParser for docs
*
* @author neilk@wikimedia.org
*/
( function ( mw, $ ) {
var slice = Array.prototype.slice,
parserDefaults = {
magic : {
'SITENAME' : mw.config.get( 'wgSiteName' )
},
... | JavaScript |
/**
* mediaWiki.Title
*
* @author Neil Kandalgaonkar, 2010
* @author Timo Tijhof, 2011
* @since 1.18
*
* Relies on: mw.config (wgFormattedNamespaces, wgNamespaceIds, wgCaseSensitiveNamespaces), mw.util.wikiGetlink
*/
( function ( mw, $ ) {
/* Local space */
/**
* Title
* @constructor
*
* @param titl... | JavaScript |
/**
* Add search suggestions to the search form.
*/
( function ( mw, $ ) {
$( document ).ready( function ( $ ) {
var map, searchboxesSelectors,
// Region where the suggestions box will appear directly below
// (using the same width). Can be a container element or the input
// itself, depending on what sui... | JavaScript |
/**
* JavaScript for the new debug toolbar, enabled through $wgDebugToolbar.
*
* @author John Du Hart
* @since 1.19
*/
( function ( mw, $ ) {
'use strict';
var debug,
hovzer = $.getFootHovzer();
debug = mw.Debug = {
/**
* Toolbar container element
*
* @var {jQuery}
*/
$container: null,
/... | JavaScript |
/**
* Implements mediaWiki.util library
*/
( function ( mw, $ ) {
'use strict';
// Local cache and alias
var util = {
/**
* Initialisation
* (don't call before document ready)
*/
init: function () {
var profile, $tocTitle, $tocToggleLink, hideTocCookie;
/* Set tooltipAccessKeyPrefix */
pro... | JavaScript |
/**
* Implements mediaWiki.notify function
*/
( function ( mw ) {
'use strict';
/**
* @see mw.notification.notify
*/
mw.notify = function ( message, options ) {
// Don't bother loading the whole notification system if we never use it.
mw.loader.using( 'mediawiki.notification', function () {
// Don't bo... | JavaScript |
/**
* Utility functions for jazzing up HTMLForm elements
*/
( function ( $ ) {
/**
* jQuery plugin to fade or snap to visible state.
*
* @param boolean instantToggle (optional)
* @return jQuery
*/
$.fn.goIn = function ( instantToggle ) {
if ( instantToggle === true ) {
return $(this).show();
}
return $(thi... | JavaScript |
/**
* Implements mediaWiki.notification library
*/
( function ( mw, $ ) {
'use strict';
var isPageReady = false,
isInitialized = false,
preReadyNotifQueue = [],
/**
* @var {jQuery}
* The #mw-notification-area div that all notifications are contained inside.
*/
$area = null;
/**
* Creates a Not... | JavaScript |
/*
* Core MediaWiki JavaScript Library
*/
var mw = ( function ( $, undefined ) {
"use strict";
/* Private Members */
var hasOwn = Object.prototype.hasOwnProperty,
slice = Array.prototype.slice;
/* Object constructors */
/**
* Map
*
* Creates an object that can be read from or written to from prototy... | JavaScript |
/**
* mediawiki.Feedback
*
* @author Ryan Kaldari, 2010
* @author Neil Kandalgaonkar, 2010-11
* @since 1.19
*
* This is a way of getting simple feedback from users. It's useful
* for testing new features -- users can give you feedback without
* the difficulty of opening a whole new talk page. For this reason,
... | JavaScript |
jQuery( function () {
mediaWiki.Debug.init();
} );
| JavaScript |
/*
* Implementation for mediaWiki.user
*/
( function ( mw, $ ) {
/**
* User object
*/
function User( options, tokens ) {
var user, callbacks;
/* Private Members */
user = this;
callbacks = {};
/**
* Gets the current user's groups or rights.
* @param {String} info: One of 'groups' or 'rights... | JavaScript |
/**
* Logger for MediaWiki javascript.
* Implements the stub left by the main 'mediawiki' module.
*
* @author Michael Dale <mdale@wikimedia.org>
* @author Trevor Parscal <tparscal@wikimedia.org>
*/
( function ( mw, $ ) {
/**
* Logs a message to the console.
*
* In the case the browser does not have a con... | JavaScript |
/**
* Library for simple URI parsing and manipulation. Requires jQuery.
*
* Do not expect full RFC 3986 compliance. Intended to be minimal, but featureful.
* The use cases we have in mind are constructing 'next page' or 'previous page' URLs,
* detecting whether we need to use cross-domain proxies for an API, cons... | JavaScript |
/**
* Exif metadata display for MediaWiki file uploads
*
* Add an expand/collapse link and collapse by default if set to
* (with JS disabled, user will see all items)
*/
( function ( mw, $ ) {
$( function () {
var $row, $col, $link,
showText = mw.msg( 'metadata-expand' ),
hideText = mw.msg( 'metadata-coll... | JavaScript |
/**
* This module enables double-click-to-edit functionality
*/
( function ( mw, $ ) {
$( function () {
var url = $( '#ca-edit a' ).attr( 'href' );
if ( url ) {
mw.util.$content.dblclick( function ( e ) {
e.preventDefault();
window.location = url;
} );
}
} );
}( mediaWiki, jQuery ) );
| JavaScript |
( function ( mw, $ ) {
var isReady, toolbar, currentFocused, queue, $toolbar, slice;
isReady = false;
queue = [];
$toolbar = false;
slice = Array.prototype.slice;
/**
* Internal helper that does the actual insertion
* of the button into the toolbar.
* See mw.toolbar.addButton for parameter documentation.
... | JavaScript |
/*
* JavaScript to enable right click edit functionality.
* When the user right-clicks in a heading, it will open the
* edit screen.
*/
jQuery( function ( $ ) {
// Select all h1-h6 elements that contain editsection links
// Don't use the ":has:(.editsection a)" selector because it performs very bad.
// http://js... | JavaScript |
/**
* Live edit preview.
*/
( function ( mw, $ ) {
/**
* @param {jQuery.Event} e
*/
function doLivePreview( e ) {
var $wikiPreview, copySelectors, removeSelectors, $copyElements, $spinner,
targetUrl, postData, $previewDataHolder;
e.preventDefault();
$( mw ).trigger( 'LivePreviewPrepare' );
$wikiP... | JavaScript |
/**
* JavaScript for History action
*/
jQuery( document ).ready( function ( $ ) {
var $historyCompareForm = $( '#mw-history-compare' ),
$historySubmitter,
$lis = $( '#pagehistory > li' );
/**
* @context {Element} input
* @param e {jQuery.Event}
*/
function updateDiffRadios() {
var diffLi = false, // t... | JavaScript |
// tipsy, facebook style tooltips for jquery
// version 1.0.0a*
// (c) 2008-2010 jason frame [jason@onehackoranother.com]
// released under the MIT license
// * This installation of tipsy includes several local modifications to both Javascript and CSS.
// Please be careful when upgrading.
(function($) {
function ... | JavaScript |
/**
* Copyright (C) 2013 BioLadder.Org
*
* This file is part of the BioLadder.Org project (http://bioladder.org/)
*
* BioLadder.Org is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 ... | JavaScript |
/**
* Copyright (C) 2013 BioLadder.Org
*
* This file is part of the BioLadder.Org project (http://bioladder.org/)
*
* BioLadder.Org is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either ver... | JavaScript |
/**
* Copyright (C) 2013 BioLadder.Org
*
* This file is part of the BioLadder.Org project (http://bioladder.org/)
*
* BioLadder.Org is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 ... | JavaScript |
/**
* Copyright (C) 2013 BioLadder.Org
*
* This file is part of the BioLadder.Org project (http://bioladder.org/)
*
* BioLadder.Org is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 ... | JavaScript |
/*jslint sloppy: true*/
/**
* Copyright (C) 2013 BioLadder.Org
*
* This file is part of the BioLadder.Org project (http://bioladder.org/)
*
* BioLadder.Org is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Softwa... | JavaScript |
/**
* Copyright (C) 2013 BioLadder.Org
*
* This file is part of the BioLadder.Org project (http://bioladder.org/)
*
* BioLadder.Org is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 ... | JavaScript |
/**
* Copyright (C) 2013 BioLadder.Org
*
* This file is part of the BioLadder.Org project (http://bioladder.org/)
*
* BioLadder.Org is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either ver... | JavaScript |
/**
* Copyright (C) 2013 BioLadder.Org
*
* This file is part of the BioLadder.Org project (http://bioladder.org/)
*
* BioLadder.Org is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 ... | JavaScript |
/*
This file is part of Sencha Touch 2.2
Copyright (c) 2011-2013 Sencha Inc
Contact: http://www.sencha.com/contact
GNU General Public License Usage
This file may be used under the terms of the GNU General Public License version 3.0 as
published by the Free Software Foundation and appearing in the file LICENSE inclu... | JavaScript |
Date.dayNames = [
'Sunday',
'Monday',
'Tuesday',
'Wednesday',
'Thursday',
'Friday',
'Saturday'
];
Date.monthNames = [
'January',
'February',
'March',
'April',
'May',
'June',
'July',
'August',
'September',
'October',
'November',
'December'
];
... | JavaScript |
/**
* A general sheet class. This renderable container provides base support for orientation-aware transitions for popup or
* side-anchored sliding Panels.
*
* In most cases, you should use {@link Ext.ActionSheet}, {@link Ext.MessageBox}, {@link Ext.picker.Picker}, or {@link Ext.picker.Date}.
*/
Ext.define('Ext.Sh... | JavaScript |
/**
* @class Ext.ComponentQuery
* @extends Object
* @singleton
*
* Provides searching of Components within {@link Ext.ComponentManager} (globally) or a specific
* {@link Ext.Container} on the document with a similar syntax to a CSS selector.
*
* Components can be retrieved by using their {@link Ext.Component xt... | JavaScript |
/**
* Ext.Anim is used to execute simple animations defined in {@link Ext.anims}. The {@link #run} method can take any of the
* properties defined below.
*
* Ext.Anim.run(this, 'fade', {
* out: false,
* autoClear: true
* });
*
* When using {@link Ext.Anim#run}, ensure you require {@link... | JavaScript |
/**
* A Container has all of the abilities of {@link Ext.Component Component}, but lets you nest other Components inside
* it. Applications are made up of lots of components, usually nested inside one another. Containers allow you to
* render and arrange child Components inside them. Most apps have a single top-leve... | JavaScript |
/**
* @private
*/
Ext.define('Ext.carousel.Item', {
extend: 'Ext.Decorator',
config: {
baseCls: 'x-carousel-item',
component: null,
translatable: true
}
});
| JavaScript |
/**
* @class Ext.carousel.Infinite
* @author Jacky Nguyen <jacky@sencha.com>
* @private
*
* The true infinite implementation of Carousel, private for now until it's stable to be public
*/
Ext.define('Ext.carousel.Infinite', {
extend: 'Ext.carousel.Carousel',
config: {
indicator: null,
ma... | JavaScript |
/**
* A private utility class used by Ext.Carousel to create indicators.
* @private
*/
Ext.define('Ext.carousel.Indicator', {
extend: 'Ext.Component',
xtype : 'carouselindicator',
alternateClassName: 'Ext.Carousel.Indicator',
config: {
/**
* @cfg
* @inheritdoc
*/
... | JavaScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.