Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix `Facebook Albums` plugin.

  • Loading branch information...
commit 31b68ee556eaec7429fed15fa9134fa704545aa8 1 parent 32eaa29
@poke poke authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  plugins/facebook.com_albums.json
View
2  plugins/facebook.com_albums.json
@@ -3,5 +3,5 @@
"ns": "downthemall.net",
"prefix": "Facebook Albums",
"match": "^https?://(?:www\\.)?facebook\\.com/media/set/(?:.(?!&aft|&bef))+$",
- "resolve": "var rePhotoLink = /<a[^>]+href=\"(https?:\\/\\/(?:www\\.)?facebook\\.com\\/photo\\.php(?:[^\"]+fbid=(\\d+))?[^\"]+)\"/img;\nvar photos = [];\nfunction loadNextPage (id) {\n\twith (new Request()) {\n\t\tonload = function() {\n\t\t\tprocessText(responseText);\n\t\t};\n\t\tonerror = function() {\n\t\t\tmarkGone();\n\t\t\tfinish();\n\t\t};\n\t\topen('GET', baseURL + '&aft=' + id);\n\t\tsend();\n\t}\n}\nfunction processText (text, noloadNext) {\n\tvar lastId, m;\n\twhile ((m = rePhotoLink.exec(text)) != null) {\n\t\tphotos.push(m[1]);\n\t\tif (!!m[2]) {\n\t\t\tlastId = m[1];\n\t\t}\n\t}\n\tif (!!lastId && !noloadNext) {\n\t\tloadNextPage(lastId)\n\t}\n\telse {\n\t\tfor each (var url in photos) {\n\t\t\taddDownload(url);\n\t\t}\n\t\tsetURL(null);\n\t\tfinish();\n\t}\n}\nprocessText(responseText, responseText.indexOf('uiMorePagerPrimary') < 0);"
+ "resolve": "var rePhotoLink = /<a[^>]+id=\"pic_(\\d+)\"[^>]+href=\"(https?:\\/\\/(?:www\\.)?facebook\\.com\\/photo\\.php[^\"]+)\"/img;\nvar photos = [];\nfunction loadNextPage (id) {\n\twith (new Request()) {\n\t\tonload = function() {\n\t\t\tprocessText(responseText);\n\t\t};\n\t\tonerror = function() {\n\t\t\tmarkGone();\n\t\t\tfinish();\n\t\t};\n\t\topen('GET', baseURL + '&aft=' + id);\n\t\tsend();\n\t}\n}\nfunction processText (text, noloadNext) {\n\tvar lastId, m;\n\twhile ((m = rePhotoLink.exec(text)) != null) {\n\t\tphotos.push(m[2]);\n\t\tlastId = m[1];\n\t}\n\tif (!!lastId && !noloadNext) {\n\t\tloadNextPage(lastId)\n\t}\n\telse {\n\t\tfor each (var url in photos) {\n\t\t\taddDownload(url);\n\t\t}\n\t\tsetURL(null);\n\t\tfinish();\n\t}\n}\nprocessText(responseText, responseText.indexOf('uiMorePagerPrimary') < 0);"
}
Please sign in to comment.
Something went wrong with that request. Please try again.