Browse Source

update bookmarklet code

master
Wesley Kerfoot 4 years ago
parent
commit
406947e834
  1. 2
      bookmarklet.js
  2. 2
      bookmarklet.min.js
  3. 2
      tweetlog.nimble

2
bookmarklet.js

@ -16,7 +16,7 @@
function getLastTweet() {
var author = window.location.pathname.split('/')[1];
var xp = "//a[contains(@href, '"+author+"/status')]";
var xp = "//a[contains(@href, '"+author+"/status') and not(contains(@href, 'photo')) and not(contains(@href, 'like'))]";
return getLastXPath(xp).pathname;
}

2
bookmarklet.min.js

@ -1 +1 @@
k="http://localhost:8080/thread"+b(),window.open(k,"_blank");function b(){return function(t){for(var n=document.evaluate(t,document,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE,null),a=n.iterateNext(),e=a;null!=a&&null!=(a=n.iterateNext());)e=a;return e}("//a[contains(@href, '"+window.location.pathname.split("/")[1]+"/status')]").pathname}var k;
javascript:k="http://localhost:8080/thread"+b(),window.open(k,"_blank");function b(){return function(t){for(var n=document.evaluate(t,document,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE,null),a=n.iterateNext(),e=a;null!=a&&null!=(a=n.iterateNext());)e=a;return e}("//a[contains(@href, '"+window.location.pathname.split("/")[1]+"/status') and not(contains(@href, 'photo')) and not(contains(@href, 'like'))]").pathname}var k;

2
tweetlog.nimble

@ -15,4 +15,4 @@ requires "https://github.com/pragmagic/karax"
task bookmark, "Builds the minified bookmarklet":
"echo -n 'javascript:' > ./bookmarklet.min.js".exec
"uglifyjs --mangle --compress toplevel,sequences=false bookmarklet.js > ./bookmarklet.min.js".exec
"uglifyjs --mangle --compress toplevel,sequences=false bookmarklet.js >> ./bookmarklet.min.js".exec

Loading…
Cancel
Save