Skip to content

Commit

Permalink
farewell tumblr raws
Browse files Browse the repository at this point in the history
  • Loading branch information
Dezaimasu committed Aug 10, 2018
1 parent 5f76cd8 commit ee2d23b
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions js/content-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -433,10 +433,6 @@ const de_contentscript = {
'twitter.com': () => {
return node.currentSrc.replace(/(jpg|jpeg|png)(:[a-z0-9]+)?$/i, '$1:orig');
},
'tumblr.com': () => {
return null; // TODO: find a new way to download raws
return node.currentSrc.replace(/^.+\/([a-z0-9]{32}\/tumblr_\w+)(_\d{2,4}).(jpg|jpeg|png)$/i, 'https://s3.amazonaws.com/data.tumblr.com/$1_raw.$3');
},
'instagram.com': () => {
function getWidth(str){
return Number(str.trim().match(/^.+ (\d+)w$/)[1]);
Expand Down

0 comments on commit ee2d23b

Please sign in to comment.