User:PerfektesChaos/js/localEdit/Firefox/chrome/content/permissions.js

/// chrome://wikilocaledit/content/permissions.js /// Provide RegExp to check whether a URL is welcome. // Used by windows: //    * content/config.xul //    * content/wikilocaledit.xul // Uses: //    < .reDomain //    < .reUserURL /// 2012-12-08 PerfektesChaos@de.wikipedia /// Fingerprint: #0#0# /// /*jshint curly:true, eqeqeq:true, strict:true, undef:true, white:false */ /*global window                                                       */ /*jslint white: true                                                  */ /*globals window: true                                                */

( function ( w ) {  "use strict";   var WLE;   if ( ! w.wikiLocalEdit ) {     w.wikiLocalEdit  =  { };   }   WLE  =  w.wikiLocalEdit;   if ( !WLE .reDomain ) {      var reUser      =  "[^ \t\r\f\n:/#]+:[^ \t\r\f\n/#]+";      WLE.reDomain    =  "^https?://(?:[-a-z0-9]+\\.)*"                         + "(?:" + "(?:"                             + "(?:"                                 + "mediawiki" + "|wikibooks" + "|wikidata" + "|wikimedia" + "|wikinews" + "|wikipedia" + "|wikiquote" + "|wikisource" + "|wikiversity" + "|wikivoyage" + "|wiktionary" + "|wmflabs" + ")"                              + "\\.org)" + "|"                           + "(?:wikia\\.com)" + ")/";     WLE.reUserURL   =  WLE.reDomain + "wiki/" + reUser + "$";      WLE.reDomain    =  new RegExp( WLE.reDomain, "" );      WLE.reUserURL   =  new RegExp( WLE.reUserURL, "" );   } } ( window ) );

/// EOF  content/permissions.js