This repository has been archived by the owner on Nov 15, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
1 addition
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,7 +65,7 @@ var nodesAddedHandler = function(nodeList, summary) { | |
var i = 0; | ||
var node, src, text; | ||
while ( node = nodeList.item(i++) ) { | ||
switch ( node.tagName ) { | ||
switch ( node.tagName.toUpperCase() ) { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
gorhill
Author
Owner
|
||
|
||
case 'SCRIPT': | ||
text = node.textContent.trim(); | ||
|
Before the switch can you check to see what's the
node.nodeType
andcontinue
for nonELEMENT_NODE (1);
. http://dom.spec.whatwg.org/#dom-node-nodetypeTEXT_NODE(3)
havetagName
undefined
and you get this error:
Uncaught TypeError: Cannot call method 'toUpperCase' of undefined
Go to
http://www.youtube.com/
and you can seeTEXT_NODE (3)
.And on line 128 can you change
nodesAddedHandler(mutation.addedNodes, summary);
to be
When elements are being removed its still calling
nodesAddedHandler
. Just to avoid making the call.