Created
November 1, 2012 21:11
-
-
Save Rhomboid/3996571 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
--- orig/resources/reddit_res/data/reddit_enhancement_suite.user.js 2012-08-13 00:17:26.000000000 -0700 | |
+++ resources/reddit_res/data/reddit_enhancement_suite.user.js 2012-11-01 14:09:45.769867200 -0700 | |
@@ -6878,7 +6878,7 @@ | |
], | |
checkToolbarLink: function(url) { | |
for (var i=0, len=this.toolbarFixLinks.length; i<len; i++) { | |
- if (url.indexOf(this.toolbarFixLinks[i]) != -1) return true; | |
+ if (url && url.indexOf(this.toolbarFixLinks[i]) != -1) return true; | |
} | |
return false; | |
}, | |
@@ -7378,6 +7378,8 @@ | |
var thisLA = entries[i].querySelector('A.title'); | |
if (thisLA != null) { | |
var thisLink = thisLA.getAttribute('href'); | |
+ if(!thisLink) | |
+ continue; | |
var thisComments = entries[i].querySelector('.comments'); | |
if (!(thisLink.match(/^http/i))) { | |
thisLink = 'http://' + document.domain + thisLink; | |
@@ -11453,6 +11455,8 @@ | |
var isTwitterLink = /twitter.com\/(?:#!\/)?([\w]+)\/(status|statuses)\/([\d]+)/i; | |
for (var i=0, len = twitterLinks.length; i<len; i++) { | |
var thisHref = twitterLinks[i].getAttribute('href'); | |
+ if(!thisHref) | |
+ continue; | |
thisHref = thisHref.replace('/#!',''); | |
if (isTwitterLink.test(thisHref)) { | |
var thisExpandoButton = document.createElement('div'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment