-
Notifications
You must be signed in to change notification settings - Fork 2
/
ui.html
58 lines (56 loc) · 3.64 KB
/
ui.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<!DOCTYPE html>
<html>
<head>
<title>Bookmark Batch-Updater</title>
<meta name="viewport" content="width=device-width"/>
<meta charset="UTF-8">
<script type="text/javascript" src="ui.js"></script>
<link rel="stylesheet" type="text/css" href="ui.css">
</link>
</head>
<body>
<h2>Bookmark Batch-Updater</h2>
<div class="controls">
<input type="radio" id="protocolRadio" class="radio" name="scanType" value="protocol" checked></input>
<label for="protocolRadio">http-to-https</label>
<input type="radio" id="domainRadio" class="radio" name="scanType" value="domain"></input>
<label for="domainRadio">replace domain</label>
<input type="radio" id="regexpRadio" class="radio" name="scanType" value="regexp"></input>
<label for="regexpRadio">RegExp</label>
<div class="spring"></div>
<div class="textcontrols">
<input id="domainFilter" type="text" placeholder="Domain name to search for - i.e. 'imgur.com'"></input>
<input id="domainReplace" type="text" placeholder="Domain name to replace results with - i.e. 'imgur.com'"></input>
<div id="regexpControls">
<details>
<summary>RegExp help...</summary>
<p>RegExp search can be used to search bookmark url or title. If operands for both url and title are defined then the update function will update both url and title.</p>
<p>RegExp mode internally uses <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace">String.search(regexp,string)</a> thus the <em>replacement</em> string can use all the special replacement patterns that the browser supports.</p>
<p>For example if you use the regexp <code>(\/\/developer\..*\/)en-US\/</code> with replacement <code>$1de-DE/</code> then it would replace the <code>en-US</code> bit with <code>de-DE</code> in "https://developer.mozilla.org/en-US/docs/Web/" and "https://developer.example.com/en-US/test/" but not in "https://addons.mozilla.org/en-US/firefox/"</p>
</details>
<span>Search bookmark URL</span>
<input id="regexpURLFilter" type="text" placeholder="RegExp to search url"></input>
<input id="regexpURLReplace" type="text" placeholder="String to replace url match with"></input>
<span>Search bookmark Title</span>
<input id="regexpTitleFilter" type="text" placeholder="RegExp to search title"></input>
<input id="regexpTitleReplace" type="text" placeholder="String to replace title match with"></input>
<p class="combo"><input id="fixupCheckbox" type="checkbox"></input><label for="fixupCheckbox">Allow BBU to try to fix urls that would otherwise be invalid. Invalid URLs will result in failure during update.</label></p>
</div>
</div>
<div class="buttonContainer">
<button id="scanButton">Scan bookmarks</button>
<button id="almostUpdateButton" disabled="true">Update bookmarks</button>
<div id="statusbar"><span id="messageBox"></span><span id="progressBox"></span></div>
</div>
<div id="updateWarning" class="hidden">
<p>Attention!</p>
<p>This operation replaces <span class="bmCount"></span> bookmark(s) and cannot be undone.</p>
<p>Unfortunately due to a <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1440988" title="bug #1440988">Firefox bug</a> modifying the bookmark URL in any way will cause it to <b>lose all its tags.</b><p>
<p>You may want to consider backing up your bookmarks before starting the update. To do so, open the bookmark manager (Ctrl/Command + Shift + O). Use the Import and Backup button from the top toolbar.</p>
<button id="updateButton" tabindex="-1">Update already!</button>
</div>
</div>
<p><span id="nBookmarks"></span><span id="domainText"></span><span class="bmCount"></span></p>
<p id="bmList"></p>
</body>
</html>