uBlock/src/whitelist.html
Deathamns 99d8f431d5 input[type="file"].click() didn't work in Safari
Click couldn't be initiated with JavaScript in Safari if the input was
hidden with display: none. Using visibility: hidden or opacity: 0 solves
the problem.

Alternative solution would be to hide (opacity: 0) the input and slide it
(position: absolute; top: 0; left: 0; width: 100%; height: 100%) over the
button, which would work in all browsers, and wouldn't require JavaScript.
2014-11-09 17:40:48 +01:00

32 lines
983 B
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>µBlock — Whitelist</title>
<link rel="stylesheet" type="text/css" href="css/common.css">
<link rel="stylesheet" type="text/css" href="css/dashboard-common.css">
<link rel="stylesheet" type="text/css" href="css/whitelist.css">
</head>
<body>
<div>
<p data-i18n="whitelistPrompt"></p>
<p><button id="importWhitelistFromFile" data-i18n="whitelistImport"></button> &emsp; <button id="exportWhitelistToFile" data-i18n="whitelistExport"></button></p>
<input id="importFilePicker" type="file" accept="text/plain" class="hiddenFileInput">
<textarea id="whitelist" dir="auto" spellcheck="false"></textarea>
<p><button id="whitelistApply" type="button" disabled="true" data-i18n="whitelistApply"></button></p>
</div>
<script src="js/js-loader.js" data-jsList="
lib/punycode.min.js
js/vapi-common.js
js/vapi-client.js
js/udom.js
js/i18n.js
js/dashboard-common.js
js/whitelist.js
"></script>
</body>
</html>