From cd16c7bfedba8e216d3ababf099a23127869fad7 Mon Sep 17 00:00:00 2001 From: Andrea Grandi Date: Sat, 19 Nov 2016 12:53:13 +0000 Subject: [PATCH 1/2] Add warning message for Readability users Fix #35 --- app/manifest.json | 3 ++- app/scripts/content.js | 15 +++++++++++++++ app/styles/content.css | 16 +++++++++++++++- 3 files changed, 32 insertions(+), 2 deletions(-) diff --git a/app/manifest.json b/app/manifest.json index 5b5c96b..9f9c91d 100644 --- a/app/manifest.json +++ b/app/manifest.json @@ -41,7 +41,8 @@ ], "web_accessible_resources": [ "images/cross.png", - "images/check.png" + "images/check.png", + "options.html" ], "permissions": [ "declarativeContent", diff --git a/app/scripts/content.js b/app/scripts/content.js index ba4df41..29ae692 100644 --- a/app/scripts/content.js +++ b/app/scripts/content.js @@ -243,6 +243,21 @@ function onMercuryReadabilityArticleExtracted(data, overlay) { var articlePreviewHTML = contentElement.innerHTML; contentElement.innerHTML = articleContent; + // Add warning message if user is still using the Readability API + if (options.extractionAPI === 'Readability') { + var optionsUrl = chrome.extension.getURL("options.html"); + var warningDiv = '
\ + FullyFeedly: Readability API Migration
\ + The Readability API you are currently using will stop working on the 10th of December. See the \ + official announcement.
\ + Please, go to the options page of FullyFeedly and select\ + the new Mercury API.
\ + Thanks a lot for using FullyFeedly :) \ +
'; + contentElement.innerHTML = warningDiv + contentElement.innerHTML; + } + // Clear image styles to fix formatting of images with class/style/width information in article markup Array.prototype.slice.call(contentElement.querySelectorAll('img')).forEach(function(el) { el.removeAttribute('class'); diff --git a/app/styles/content.css b/app/styles/content.css index 150b498..35c1c86 100644 --- a/app/styles/content.css +++ b/app/styles/content.css @@ -1,3 +1,17 @@ +.migrationWarning { + border-style: solid; + border-width: 1px; + border-radius: 3px; + padding: 10px; + border-color: #a94442; + color: #333333; + font-family: sans-serif; +} + +.migrationWarning b { + color: #a94442 !important; +} + .showFullArticleBtn, .showArticlePreviewBtn { padding: 14px 20px 14px 20px; font-size: 14px; @@ -33,4 +47,4 @@ .websiteCallForAction { margin-top: 10px !important; -} \ No newline at end of file +} From c653d360423570316d7709c3bf3ddba29d85e811 Mon Sep 17 00:00:00 2001 From: Andrea Grandi Date: Sat, 19 Nov 2016 12:54:32 +0000 Subject: [PATCH 2/2] Prepare for release v0.9.2 --- app/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/manifest.json b/app/manifest.json index 9f9c91d..b7b74b5 100644 --- a/app/manifest.json +++ b/app/manifest.json @@ -1,6 +1,6 @@ { "name": "__MSG_appName__", - "version": "0.9.1", + "version": "0.9.2", "manifest_version": 2, "description": "__MSG_appDescription__", "icons": {