Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make the UpdaterHelper function on WebKit-based browsers.

  • Loading branch information...
commit 70c5e98d44ecb7129501155811088a5b26cd1bf7 1 parent 24569d1
Tobie Langel tobie authored
7 ext/update_helper/prototype_update_helper.html
View
@@ -81,7 +81,12 @@
new Test.Unit.Runner({
testGetStack: function() {
- this.assertMatch(/prototype_update_helper\.html:\d+\n$/, prototypeUpdateHelper.getStack());
+ var stack = prototypeUpdateHelper.getStack();
+ if (stack === '') {
+ this.info('UpdaterHelper#getStack is currently not supported on this browser.')
+ } else {
+ this.assertMatch(/prototype_update_helper\.html:\d+\n$/, prototypeUpdateHelper.getStack());
+ }
},
testDisplay: function() {
4 ext/update_helper/prototype_update_helper.js
View
@@ -1,6 +1,6 @@
//= require "update_helper"
-/* UpdateHelper for Prototype <%= PROTOTYPE_VERSION %> (c) 2008 Tobie Langel
+/* UpdateHelper for Prototype <%= PROTOTYPE_VERSION %> (c) 2008-2009 Tobie Langel
*
* UpdateHelper for Prototype is freely distributable under the same
* terms as Prototype (MIT-style license).
@@ -17,7 +17,7 @@
*
* This, for example, will prevent deprecation messages from being logged.
*
- * THIS SCRIPT WORKS IN FIREFOX ONLY
+ * THIS SCRIPT DOES NOT WORK IN INTERNET EXPLORER
*--------------------------------------------------------------------------*/
var prototypeUpdateHelper = new UpdateHelper([
11 ext/update_helper/update_helper.js
View
@@ -1,4 +1,4 @@
-/* Update Helper (c) 2008 Tobie Langel
+/* Update Helper (c) 2008-2009 Tobie Langel
*
* Requires Prototype >= 1.6.0
*
@@ -54,9 +54,12 @@ var UpdateHelper = Class.create({
try {
throw new Error("stack");
} catch(e) {
- return (e.stack || '').match(this.Regexp).reject(function(path) {
- return /(prototype|unittest|update_helper)\.js/.test(path);
- }).join("\n");
+ var match = (e.stack || '').match(this.Regexp);
+ if (match) {
+ return match.reject(function(path) {
+ return (/(prototype|unittest|update_helper)\.js/).test(path);
+ }).join("\n");
+ } else { return ''; }
}
},
Please sign in to comment.
Something went wrong with that request. Please try again.