reddit_next, reddit_prev: update for change to reddit.com
authorJohn Foerch <jjfoerch@earthlink.net>
Sat, 8 Dec 2012 05:15:41 +0000 (8 00:15 -0500)
committerJohn Foerch <jjfoerch@earthlink.net>
Sat, 8 Dec 2012 05:16:32 +0000 (8 00:16 -0500)
Update of the xpath expressions that find the "next" and "prev" links.

modules/page-modes/reddit.js

index de713b0..3da6282 100644 (file)
@@ -73,7 +73,7 @@ function reddit_next (I) {
                 next = first;
             if (reddit_end_behavior == 'page') {
                 let (xpr = doc.evaluate(
-                    '//p[@class="nextprev"]/a[text()="next"]', doc, null,
+                    '//p[@class="nextprev"]/a[contains(text(),"next")]', doc, null,
                     Ci.nsIDOMXPathResult.ORDERED_NODE_ITERATOR_TYPE, null))
                 {
                     let nextpage;
@@ -151,7 +151,7 @@ function reddit_prev (I) {
             }
         } else if (reddit_end_behavior == 'page') {
             let (xpr = doc.evaluate(
-                '//p[@class="nextprev"]/a[text()="prev"]', doc, null,
+                '//p[@class="nextprev"]/a[contains(text(),"prev")]', doc, null,
                 Ci.nsIDOMXPathResult.ORDERED_NODE_ITERATOR_TYPE, null))
             {
                 let prevpage;