Просмотр исходного кода

webutil.js, util.js: split cleanup.

Joel Martin 15 лет назад
Родитель
Сommit
a59f1cd269
2 измененных файлов с 4 добавлено и 20 удалено
  1. 3 19
      include/util.js
  2. 1 1
      include/webutil.js

+ 3 - 19
include/util.js

@@ -8,28 +8,12 @@
 
 "use strict";
 /*jslint bitwise: false, white: false */
-/*global window, console, document, navigator, ActiveXObject*/
+/*global window, console, document, navigator, ActiveXObject */
 
 // Globals defined here
-var Util = {}, $;
+var Util = {};
 
 
-/*
- * Simple DOM selector by ID
- */
-if (!window.$) {
-    $ = function (id) {
-        if (document.getElementById) {
-            return document.getElementById(id);
-        } else if (document.all) {
-            return document.all[id];
-        } else if (document.layers) {
-            return document.layers[id];
-        }
-        return undefined;
-    };
-}
-
 /*
  * Make arrays quack
  */
@@ -238,4 +222,4 @@ Util.Flash = (function(){
     }
     version = v.match(/\d+/g);
     return {version: parseInt(version[0] || 0 + '.' + version[1], 10) || 0, build: parseInt(version[2], 10) || 0};
-}()); 
+}()); 

+ 1 - 1
include/webutil.js

@@ -8,7 +8,7 @@
 
 "use strict";
 /*jslint bitwise: false, white: false */
-/*global window, console, document, navigator, ActiveXObject*/
+/*global window, document */
 
 // Globals defined here
 var WebUtil = {}, $;