Skip to content

Commit

Permalink
button always shown on vk images
Browse files Browse the repository at this point in the history
  • Loading branch information
Dezaimasu committed Aug 18, 2018
1 parent 4b2554a commit 7997193
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion js/content-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ const de_contentscript = {
'yandex.*' : 'self::div[contains(@class, "preview2__arrow")]/preceding-sibling::div[contains(@class, "preview2__wrapper")]/div[@class="preview2__thumb-wrapper"]/img[contains(@class, "visible")] | self::div[contains(@class, "preview2__control")]/../preceding-sibling::div[contains(@class, "preview2__wrapper")]/div[@class="preview2__thumb-wrapper"]/img[contains(@class, "visible")]',
'instagram.com' : 'self::div/preceding-sibling::div/img | self::a[@role="button"]/preceding-sibling::div//video | self::ul/parent::div/preceding-sibling::div[@role="button"]/div/img',
'iwara.tv' : 'self::div[@class="vjs-poster"]/preceding-sibling::video[@class="vjs-tech"]',
'vk.com' : 'self::a[contains(@class, "image_cover") and contains(@onclick, "showPhoto")]',
};

that.actualNode = crutches[that.host] && xpath(crutches[that.host], node);
Expand Down Expand Up @@ -428,7 +429,7 @@ const de_contentscript = {
const getters = {
'vk.com': () => {
const info = JSON.parse(node.getAttribute('onclick').match(/^.*"?temp"? *: *({[^{}]+}).*$/)[1]);
return info['base'] + (info['w_'] || info['z_'] || info['y_'])[0] + '.jpg';
return info['base'] + (info['w_'] || info['z_'] || info['y_'] || info['x_'])[0] + '.jpg';
},
'twitter.com': () => {
return node.currentSrc.replace(/(jpg|jpeg|png)(:[a-z0-9]+)?$/i, '$1:orig');
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Cute Save Button",
"version": "0.5.6",
"version": "0.5.7",
"description": "__MSG_extensionDescription__",
"author": "Deil",
"default_locale": "en",
Expand Down

0 comments on commit 7997193

Please sign in to comment.