-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathoptions.html
212 lines (188 loc) · 7.58 KB
/
options.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
<html>
<head>
<style type='text/css'>
body {
background-color: #f5f5f5;
font-family: sans-serif;
}
#content {
margin: 3em 10em 0 3em;
}
.section {
background-color: #fff;
margin: 1em 0;
}
fieldset {
padding: 1em;
border: none;
}
legend {
padding: 0.5em 1em;
margin-left: -1em;
font-weight: bold;
background-color: #fff;
-webkit-box-shadow: 0 10px 5px #888;
width: 100%;
}
fieldset input[type='checkbox'] {
float: left;
clear: left;
height: 1.8em;
}
fieldset label {
float: left;
line-height: 1.8em;
}
fieldset input[type="text"] {
float: left;
line-height: 1.5em;
}
.format {
float: left;
padding: 0;
}
fieldset > div > label {
float: left;
padding-left: 0.5em;
text-align: right;
min-width: 7.5em;
}
fieldset > div > input[type='text'] {
margin: 0.5em 1em;
max-width: 95%;
}
.customformat {
float: left;
margin: 0 1em;
}
.customformat label {
font-style: italic;
color: #777;
font-size: 0.8em;
padding: 0 0.2em 0 1em;
}
.customformatlabel {
position: absolute;
top: -9999px;
left: -9999px;
}
.note {
float: right;
margin: 0.5em 0 0 2em;
font-size: 0.9em;
line-height: 1.3em;
padding: 1em;
outline: 4px #ccc solid;
background-color: #fff;
}
.title {
font-weight: bold;
}
.variables var {
font-style: normal;
}
.variables dt {
float: left;
clear: left;
text-align: right;
min-width: 7em;
}
.variables dd {
font-size: 0.9em;
float: left;
margin-left: 1em;
}
#status {
max-height: 7em;
overflow: auto;
}
#status .message {
border-top: 1px #eee solid;
border-bottom: 1px #eee solid;
background-color: #fdfdfd;
padding: 1em 0.5em;
}
button {
height: 3em;
width: 100%;
}
</style>
<script type="text/javascript" src="format.js"></script>
<script type="text/javascript" src="options.js"></script>
</head>
<body onload="init()">
<div id='content'>
<div class='note'><span class='title'>Variables:</span>
<dl class='variables'>
<dt><var>%%url%%</var></dt><dd>URL of the clicked link</dd>
<dt><var>%%text%%</var></dt><dd>Text of the clicked link</dd>
<dt><var>%%title%%</var></dt><dd>Title attribute of the link</dd>
<dt><var>%%pageurl%%</var></dt><dd>URL of the current page</dd>
<dt><var>%%pagetitle%%</var></dt><dd>Title of the current page</dd>
</dl></div>
<fieldset class='section' id="defaultformats">
<legend>Copy as...</legend>
<div class='format'>
<input type="checkbox" name="outputformat" id="text" /><label for="text">link text</label>
<input type="text" size="90" value="%%text%%" disabled="disabled" />
</div>
<div class='format'>
<input type="checkbox" name="outputformat" id="html" /><label for="html">HTML link</label>
<input type="text" size="90" value="<a href="%%url%%">%%text%%</a>" disabled="disabled" />
</div>
<div class='format'>
<input type="checkbox" name="outputformat" id="mediawiki" /><label for="mediawiki">wiki link</label>
<input type="text" size="90" value="[%%url%% %%text%%]" disabled="disabled" />
</div>
</fieldset>
<fieldset class="section" id="customformats">
<legend>Copy as custom format...</legend>
<div class='format'>
<input type="checkbox" name="outputformat" id="custom1" /><label for="custom1">Custom Format 1</label>
<div class="customformat">
<label for="custom1_label">menu item</label><input type="text" placeholder="Custom Format" title="name in dropdown menu" name="custom_label" id="custom1_label" />
<label for="custom1_text" class="customformatlabel">format</label><input type="text" placeholder="%%text%% - %%url%%" size="90" name="custom" id="custom1_text" />
</div>
</div>
<div class='format'>
<input type="checkbox" name="outputformat" id="custom2" /><label for="custom2">Custom Format 2</label>
<div class="customformat">
<label for="custom2_label">menu item</label><input placeholder="Custom Format" title="name in dropdown menu" type="text" name="custom_label" id="custom2_label" />
<label for="custom2_text" class="customformatlabel">format</label><input type="text" placeholder="%%text%% - %%url%%" size="90" name="custom" id="custom2_text" />
</div>
</div>
<div class='format'>
<input type="checkbox" name="outputformat" id="custom3" /><label for="custom3">Custom Format 3</label>
<div class="customformat">
<label for="custom3_label">menu item</label><input placeholder="Custom Format" title="name in dropdown menu" type="text" name="custom_label" id="custom3_label" />
<label for="custom3_text" class="customformatlabel">format</label><input type="text" placeholder="%%text%% - %%url%%" size="90" name="custom" id="custom3_text" />
</div>
</div>
<div class='format'>
<input type="checkbox" name="outputformat" id="custom4" /><label for="custom4">Custom Format 4</label>
<div class="customformat">
<label for="custom4_label">menu item</label><input placeholder="Custom Format" title="name in dropdown menu" type="text" name="custom_label" id="custom4_label" />
<label for="custom4_text" class="customformatlabel">format</label><input type="text" placeholder="%%text%% - %%url%%" size="90" name="custom" id="custom4_text" />
</div>
</div>
<div class='format'>
<input type="checkbox" name="outputformat" id="custom5" /><label for="custom5">Custom Format 5</label>
<div class="customformat">
<label for="custom5_label">menu item</label><input placeholder="Custom Format" title="name in dropdown menu" type="text" name="custom_label" id="custom5_label" />
<label for="custom5_text" class="customformatlabel">format</label><input type="text" placeholder="%%text%% - %%url%%" size="90" name="custom" id="custom5_text" />
</div>
</div>
</fieldset>
<fieldset class="section" id="misc">
<legend>Misc</legend>
<div>
<input type="checkbox" name="highlight" id="highlight" /><label for="highlight">Highlight link after copy</label>
</div>
</fieldset>
<div class='section' id="actions">
<button onclick="save_options()">Save</button>
</div>
<div class='section' id="status" aria-live=""></div>
</div>
</body>
</html>