r66607 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r66606‎ | r66607 | r66608 >
Date:12:39, 18 May 2010
Author:papyromancer
Status:deferred
Tags:
Comment:
closure compatibility for mwEmbed.js
Modified paths:
  • /branches/MwEmbedStandAlone/mwEmbed.js (modified) (history)

Diff [purge]

Index: branches/MwEmbedStandAlone/mwEmbed.js
@@ -87,10 +87,9 @@
8888 /**
8989 * Set a default config value
9090 * Will only update configuration if no value is present
91 - * @param [Mixed] name
92 - * {Object} Will iderate through each key and call setDefaultConfig
93 - * {String} Will set configuration by string name to value
9491 * @param [Mixed] value Set configuration name to value
 92+ * {Object} Will iderate through each key and call setDefaultConfig
 93+ * {String} Will set configuration by string name to value
9594 */
9695 mw.setDefaultConfig = function( name, value ) {
9796 if( typeof name == 'object' ) {
@@ -1205,7 +1204,7 @@
12061205
12071206 /**
12081207 * Checks if a mw request data requires a post request or not
1209 - * @param {Object}
 1208+ * @param data {Object}
12101209 * @return {Boolean}
12111210 * true if the request requires a post request
12121211 * false if the request does not
@@ -1227,10 +1226,9 @@
12281227 * Check if the url is a request for the local domain
12291228 * relative paths are "local" domain
12301229 * @param {String} url Url for local domain
1231 - * @return
 1230+ * @return {Boolean}
12321231 * true if url domain is local or relative
12331232 * false if the domain is
1234 - * @type {Boolean}
12351233 */
12361234 mw.isLocalDomain = function( url ) {
12371235 if( mw.parseUri( document.URL ).host == mw.parseUri( url ).host
@@ -1707,8 +1705,8 @@
17081706 /**
17091707 * Get a style sheet and append the style sheet to the DOM
17101708 *
1711 - * @param {Mixed}
1712 - * {String} url Url of the style sheet to be loaded
 1709+ * @param [Mixed]
 1710+ * {String} url Url of the style sheet to be loaded
17131711 * {Function} callback Function called once sheet is ready
17141712 */
17151713 mw.getStyleSheet = function( url , callback) {
@@ -1846,8 +1844,7 @@
18471845 *
18481846 * @param {Float} sec Seconds
18491847 * @param {Boolean} show_ms If milliseconds should be displayed.
1850 - * @return String npt format
1851 - * @type {Float}
 1848+ * @return {Float} String npt format
18521849 */
18531850 mw.seconds2npt = function( sec, show_ms ) {
18541851 if ( isNaN( sec ) ) {
@@ -1875,8 +1872,7 @@
18761873 * Take hh:mm:ss,ms or hh:mm:ss.ms input, return the number of seconds
18771874 *
18781875 * @param {String} npt_str NPT time string
1879 - * @return Number of seconds
1880 - * @type {Float}
 1876+ * @return {Float} Number of seconds
18811877 */
18821878 mw.npt2seconds = function ( npt_str ) {
18831879 if ( !npt_str ) {
@@ -2388,10 +2384,9 @@
23892385 * NOTE: this only works for style sheets on the same domain :(
23902386 *
23912387 * @param {String} styleRule Style rule name to check
2392 - * @return
2393 - * true if the rule exists
2394 - * false if the rule does not exist
2395 - * @type {Boolean}
 2388+ * @return {Boolean}
 2389+ * true if the rule exists
 2390+ * false if the rule does not exist
23962391 */
23972392 mw.styleRuleExists = function ( styleRule ) {
23982393 // Set up the skin paths configuration
@@ -2702,4 +2697,4 @@
27032698 // (this is needed because packaged loader.js files could refrence jQuery )
27042699 if( mw.getScriptLoaderPath() && !window.jQuery ) {
27052700 mw.log( 'Error: jQuery is required for mwEmbed, please update your script-loader request' );
2706 -}
\ No newline at end of file
 2701+}

Status & tagging log