diff --git a/app/js/background.js b/app/js/background.js
index 0864c4f..58afdec 100644
--- a/app/js/background.js
+++ b/app/js/background.js
@@ -40,7 +40,7 @@ chrome.runtime.onMessage.addListener(
browser.notifications.create({
"type": "basic",
"title": "Copy Failed",
- "message": "Copying " + x.type + " files are unsupported. \nDownload or use the right click context menu."
+ "message": "Copying " + x.type.split('/')[1] + " images are not supported. \nDownload or use the right click context menu."
});
return;
}
@@ -52,4 +52,11 @@ chrome.runtime.onMessage.addListener(
});
});
};
- });
\ No newline at end of file
+ });
+
+// Save browser version in settings
+browser.runtime.getBrowserInfo().then(function(info, e) {
+ chrome.storage.local.set({
+ copySupported: info.version.split('.')[0] >= 57
+ });
+});
\ No newline at end of file
diff --git a/app/js/content-script.js b/app/js/content-script.js
index dd9b489..fc371e1 100644
--- a/app/js/content-script.js
+++ b/app/js/content-script.js
@@ -6,7 +6,8 @@ var defaultSettings = {
newTab: true,
openVisible: true,
primary: "view",
- placement: "default"
+ placement: "default",
+ copySupported: false
}
// Renderers
@@ -17,6 +18,7 @@ function renderUI() {
chrome.storage.local.get(null, function(settings) {
settings = Object.assign(defaultSettings, settings);
+
var template = document.createElement('template');
var settingsTemplate = document.createElement('template');
@@ -25,7 +27,7 @@ function renderUI() {
var view = `
View Image
`;
- var copy = `Copy Image`;
+ var copy = settings.copySupported ? `Copy Image` : '';
var save = `Download`;
var primary = '';
var sec1 = '';
@@ -205,8 +207,8 @@ function SettingsOpen() {
-
-
+ ` + (settings.copySupported ? `
+
` : '') + `
diff --git a/app/manifest.json b/app/manifest.json
index d47c25b..520749a 100644
--- a/app/manifest.json
+++ b/app/manifest.json
@@ -3,7 +3,7 @@
"description": "Brings back the 'View Image' and 'Search by Image' options in google image search results, as well as adding copy and download options.",
"manifest_version": 2,
"name": "View Image Resurrected",
- "version": "1.8.1",
+ "version": "1.8.2",
"permissions": [
"webRequest",
"",
@@ -18,7 +18,7 @@
},
"applications": {
"gecko": {
- "strict_min_version": "57.0a1"
+ "strict_min_version": "51.0a1"
}
},
diff --git a/package.json b/package.json
index 930887e..d174f42 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "view-image-resurrected",
- "version": "1.8.1",
+ "version": "1.8.2",
"description": "![Icon](icons/icon-96.png)\r # View Image Resurrected",
"main": "index.js",
"scripts": {