Created
February 17, 2012 05:40
-
-
Save pifantastic/1850981 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/main.js b/app/main.js | |
index 766b9ec..baf67b8 100644 | |
--- a/app/main.js | |
+++ b/app/main.js | |
@@ -65,7 +68,7 @@ function(namespace, jQuery, Backbone, Example) { | |
var protocol = this.protocol + "//"; | |
// Ensure the protocol is not part of URL, meaning its relative. | |
- if (href && href.slice(0, protocol.length) !== protocol) { | |
+ if (href && href.slice(0, protocol.length) !== protocol && href.indexOf("javascript:") !== 0) { | |
// Stop the default event to ensure the link will not cause a page | |
// refresh. | |
evt.preventDefault(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment