import
This commit is contained in:
1
ui/popup/app.js
Normal file
1
ui/popup/app.js
Normal file
File diff suppressed because one or more lines are too long
41
ui/popup/compatibility.js
Normal file
41
ui/popup/compatibility.js
Normal file
@@ -0,0 +1,41 @@
|
||||
(function () {
|
||||
var match = navigator.userAgent.toLowerCase().match(/chrom[e|ium]\/([^ \.]+)/);
|
||||
if (!match) {
|
||||
return;
|
||||
}
|
||||
var version = parseInt(match[1]);
|
||||
var minChromeVersion = 63;
|
||||
if (version >= minChromeVersion) {
|
||||
return;
|
||||
}
|
||||
var warning = document.createElement("div");
|
||||
warning.className = "compatibility-warning";
|
||||
var text = document.createTextNode(
|
||||
[
|
||||
"Your Google Chrome (or Chromium) version " + version + " is out of date.",
|
||||
"In order to use this extension update your Google Chrome.",
|
||||
"If you cannot update, install the old Dark Reader version, which works for at least Chrome 49, from ",
|
||||
].join(" ")
|
||||
);
|
||||
var link = document.createElement("a");
|
||||
link.href = "https://chrome.google.com/webstore/detail/iabnclnclchijjckhdljmocghgmgnnii";
|
||||
link.target = "_blank";
|
||||
link.textContent = "here";
|
||||
warning.appendChild(text);
|
||||
warning.appendChild(link);
|
||||
warning.style.backgroundColor = "#00222b";
|
||||
warning.style.boxSizing = "border-box";
|
||||
warning.style.color = "#e96c4c";
|
||||
warning.style.height = "100%";
|
||||
warning.style.left = "0";
|
||||
warning.style.padding = "40% 1rem 0 1rem";
|
||||
warning.style.position = "fixed";
|
||||
warning.style.textAlign = "justify";
|
||||
warning.style.textAlignLast = "center";
|
||||
warning.style.top = "0";
|
||||
warning.style.width = "100%";
|
||||
warning.style.zIndex = "2014";
|
||||
link.style.color = "#e96c4c";
|
||||
link.style.outline = "none";
|
||||
document.body.appendChild(warning);
|
||||
})();
|
||||
23
ui/popup/index.html
Normal file
23
ui/popup/index.html
Normal file
@@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>Dark Reader settings</title>
|
||||
<meta name="theme-color" content="#0B2228" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="stylesheet" type="text/css" href="style.css" />
|
||||
<link
|
||||
rel="shortcut icon"
|
||||
href="../assets/images/darkreader-icon-256x256.png"
|
||||
/>
|
||||
<script src="index.js" defer></script>
|
||||
<script src="compatibility.js" defer></script>
|
||||
<script src="app.js" defer></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="loader">
|
||||
<label class="loader__message">Loading, please wait</label>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
7006
ui/popup/index.js
Normal file
7006
ui/popup/index.js
Normal file
File diff suppressed because it is too large
Load Diff
3053
ui/popup/style.css
Normal file
3053
ui/popup/style.css
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user