Commit 1db1e7d9 authored by Dave Vandyke's avatar Dave Vandyke 🐈

Issue 4783 - Drop Safari support

parent b9602c7b
......@@ -33,7 +33,7 @@ Directory structure
Testing
-------
In Firefox and Safari the HTML pages can be opened directly from the file system
In Firefox the HTML pages can be opened directly from the file system
and should be fully functional. Due to security restrictions in Chrome, there
you need to pass in the `--allow-file-access-from-files` command line flag when
starting the application. Alternatively, you can run `test_server.py` (requires
......@@ -64,8 +64,7 @@ To aid testing, the behavior of this page is affected by a number of URL
parameters:
* `platform`, `platformVersion`, `application`, `applicationVersion`: sets
application parameters that are normally determined by Adblock Plus. Using
`?platform=safari&platformVersion=5.0` should trigger a warning.
application parameters that are normally determined by Adblock Plus.
* `filterlistsReinitialized`: setting these parameters to `true` should
trigger warnings referring to issues detected by Adblock Plus.
* `blockedURLs`: a comma-separated list of URLs that should be considered
......@@ -91,7 +90,6 @@ parameters:
* `downloadStatus`: sets downloadStatus parameter for filter lists, can be used
to trigger various filter list download errors
* `platform=chromium`: shows the opt-out for the developer tools panel
* `safariContentBlocker=true`: sets Safari content blocker mock API
* `showNotificationUI=true`: simulates user having opted-out of notifications
......
......@@ -70,8 +70,7 @@
addSubscription: false,
filterError: false,
downloadStatus: "synchronize_ok",
showNotificationUI: false,
safariContentBlocker: false
showNotificationUI: false
};
updateFromURL(params);
......@@ -98,7 +97,6 @@
var prefs = {
notifications_ignoredcategories: (params.showNotificationUI) ? ["*"] : [],
notifications_showui: params.showNotificationUI,
safari_contentblocker: false,
shouldShowBlockElementMenu: true,
show_devtools_panel: true,
subscriptions_exceptionsurl: "https://easylist-downloads.adblockplus.org/exceptionrules.txt"
......@@ -522,13 +520,4 @@
}
});
});
if (params.safariContentBlocker)
{
global.safari = {
extension: {
setContentBlocker: function() {}
}
};
}
})(this);
......@@ -37,7 +37,6 @@
<h1 id="title-main" class="i18n_firstRun_title"></h1>
</header>
<section id="legacySafariWarning" class="i18n_firstRun_legacySafariWarning warning" hidden="true"></section>
<section id="filterlistsReinitializedWarning" class="i18n_firstRun_filterlistsReinitializedWarning warning" hidden="true"></section>
<div id="content">
......
......@@ -64,9 +64,6 @@
E("filterlistsReinitializedWarning").removeAttribute("hidden");
setLinks("filterlistsReinitializedWarning", openFilters);
}
if (issues.legacySafariVersion)
E("legacySafariWarning").removeAttribute("hidden");
});
updateSocialLinks();
......
......@@ -26,9 +26,6 @@
"firstRun_filterlistsReinitializedWarning": {
"message": "It seems that an issue caused all filters to be removed and we were unable to restore a backup. Therefore we had to reset your filters and Acceptable Ads settings. Please check your filter lists and Acceptable Ads settings in the <a>Adblock Plus options</a>."
},
"firstRun_legacySafariWarning": {
"message": "You are using an old version of Safari which is not supported by Adblock Plus. It might not work correctly or impair the user experience on some websites. We strongly recommend to either update to Safari 6.1.1 or higher (on OS X 10.8 Mountain Lion), or Safari 7.0.1 or higher (on OS X 10.9 Mavericks), or to use the latest version of Mozilla Firefox, Google Chrome or Opera."
},
"firstRun_share": {
"message": "Tell your friends"
},
......
......@@ -179,14 +179,6 @@
"description": "Notification opt-out option in Advanced tab",
"message": "Show useful notifications"
},
"options_tweaks_safariContentBlocker": {
"description": "Switch between classic and Safari's Content Blocking",
"message": "Use Safari's native Content Blocking (experimental)"
},
"options_tweaks_restartSafari": {
"description": "Shown next to the option for Safai Content Blockers if disabled in order to indicate that a restart is required",
"message": "Please restart Safari"
},
"options_filterList_title": {
"description": "Section title in Advanced tab",
"message": "Filter lists"
......
......@@ -158,11 +158,7 @@
{
let subscriptionInit = tryRequire("subscriptionInit");
return {
filterlistsReinitialized: subscriptionInit ? subscriptionInit.reinitialized : false,
legacySafariVersion: (info.platform == "safari" && (
Services.vc.compare(info.platformVersion, "6.0") < 0 || // beforeload breaks websites in Safari 5
Services.vc.compare(info.platformVersion, "6.1") == 0 || // extensions are broken in 6.1 and 7.0
Services.vc.compare(info.platformVersion, "7.0") == 0))
filterlistsReinitialized: subscriptionInit ? subscriptionInit.reinitialized : false
};
}
......@@ -183,10 +179,7 @@
if (message.what == "features")
{
return {
devToolsPanel: info.platform == "chromium",
safariContentBlocker: "safari" in global
&& "extension" in global.safari
&& "setContentBlocker" in global.safari.extension
devToolsPanel: info.platform == "chromium"
};
}
......
......@@ -221,13 +221,6 @@
<span class="i18n_options_tweaks_showNotifications"></span>
</label>
</li>
<li data-pref="safari_contentblocker">
<label>
<button role="checkbox" data-action="toggle-pref"></button>
<span class="i18n_options_tweaks_safariContentBlocker"></span>
</label>
<span id="restart-safari" class="i18n_options_tweaks_restartSafari"></span>
</li>
</ul>
</div>
......
......@@ -800,14 +800,6 @@
function(features)
{
hidePref("show_devtools_panel", !features.devToolsPanel);
// Only show option to switch between Safari Content Blockers
// and event based blocking if both are available.
hidePref("safari_contentblocker", !(
features.safariContentBlocker &&
"canLoad" in safari.self.tab &&
"onbeforeload" in Element.prototype
));
});
var filterTextbox = document.querySelector("#custom-filters-add input");
......@@ -1114,10 +1106,6 @@
case "notifications_showui":
hidePref("notifications_ignoredcategories", !value);
break;
case "safari_contentblocker":
E("restart-safari").setAttribute("aria-hidden", value || initial);
break;
}
var checkbox = document.querySelector("[data-pref='" + key + "'] button[role='checkbox']");
......@@ -1272,8 +1260,7 @@
{
type: "prefs.listen",
filter: ["notifications_ignoredcategories", "notifications_showui",
"safari_contentblocker", "show_devtools_panel",
"shouldShowBlockElementMenu"]
"show_devtools_panel", "shouldShowBlockElementMenu"]
});
ext.backgroundPage.sendMessage(
{
......
......@@ -668,14 +668,6 @@ button[role="checkbox"],
Advanced tab content
*/
#restart-safari
{
-moz-margin-start: 20px;
-webkit-margin-start: 20px;
color: red;
font-weight: 600;
}
#filter-lists > div,
#all-filter-lists li.show-message .date,
#all-filter-lists li.show-message .time,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment