Permalink
Browse files

Bugfix: IE does not known TEXT_NODE and Text.

  • Loading branch information...
1 parent de879b5 commit c0bb0a8c9d91671151c1f40fdf7befdfb4710c25 @jiangxin committed Dec 5, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 html/inc/click_more.js
View
6 html/inc/click_more.js
@@ -1,9 +1,10 @@
// ==UserScript==
// @name Click more for toggle
-// @namespace gotgit
+// @namespace gotgit
// @description Add a toogle effect at the location where anchor with a click-more css.
// @include http://www.worldhello.net/gotgit/demo*
// @include http://gotgit.github.com/gotgit/demo*
+// @include http://www.ossxp.com/doc/gotgit/demo*
// @require http://code.jquery.com/jquery-1.6.2.min.js
// ==/UserScript==
@@ -14,7 +15,8 @@ $(function(){
$('.click-more').each(function(i) {
contentNode = this.parentNode.nextSibling;
- if (contentNode instanceof Text) {
+ if (contentNode.nodeType ==
+ (typeof(Node) === "undefined" ? 3: Node.TEXT_NODE)) {
contentNode = contentNode.nextSibling;
}
contentNode.parentNode.removeChild(contentNode);

0 comments on commit c0bb0a8

Please sign in to comment.