-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoptions.html
More file actions
88 lines (68 loc) · 2.57 KB
/
Copy pathoptions.html
File metadata and controls
88 lines (68 loc) · 2.57 KB
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
<!--
options.html
Copyright 2011-2013 Ramkumar Shankar
This file is part of the Instapaper for Opera extension.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="styles/options.css">
<link href='http://fonts.googleapis.com/css?family=Crimson+Text' rel='stylesheet' type='text/css'>
<title id="widget-title">Instapaper for Opera</title>
</head>
<body>
<img src="icons/instapaper-icon-64.png">
<h1 id="widget-name">Instapaper for Opera</h1>
<h2>A dead simple extension to send webpages to Instapaper</h2>
<div id="settings">
<fieldset>
<p>
<input id="username" name="userid" type="text" placeholder="Username"></input>
</p>
<p>
<input id="password" name="passwd" type="password" placeholder="Password, if you have one"></input>
</p>
</fieldset>
<input id="context_menu" name="cntxt_menu" type="checkbox">
<label for="context_menu">Hide context-menu button</label>
</div>
<script>
var username = document.getElementById('username');
var password = document.getElementById('password');
var context_menu = document.getElementById('context_menu');
//opera.postError(widget.preferences.username + ' ' + widget.preferences.password + ' ' + widget.preferences.context_menu);
username.addEventListener('change', function() {
widget.preferences.username = this.value;
}, false);
password.addEventListener('change', function() {
widget.preferences.password = this.value;
}, false);
context_menu.addEventListener('change', function () {
if (this.checked) {
widget.preferences.context_menu = 'off';
} else {
widget.preferences.context_menu = 'on';
}
}, false);
if ( widget.preferences.username && widget.preferences.password ) {
username.value = widget.preferences.username;
password.value = widget.preferences.password;
}
if (widget.preferences.context_menu === 'off') {
context_menu.checked = widget.preferences.context_menu;
} else {
context_menu.removeAttribute('checked');
}
</script>
</body>
</html>