-
Notifications
You must be signed in to change notification settings - Fork 22
/
options.html
111 lines (96 loc) · 4.2 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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>ForceCORS Options</title>
<link rel="stylesheet" href="bootstrap.min.css"/>
<style type="text/css">
body {
padding: 2em;
}
input {
margin-bottom: 0;
}
textarea {
width: 100%;
min-height: 350px;
font-family:'Courier New', sans;
font-size: 1.1em;
}
</style>
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="bootstrap-modal.js"></script>
<script type="text/javascript" src="FormatJSON.js"></script>
<script type="text/javascript" src="require.js"></script>
<script type="text/javascript" src="options.js"></script>
</head>
<body>
<h1>ForceCORS Settings</h1>
<p>Below you can specify the desired headers to add or replace per each URL.
<br/>Use '*' as a wildcard (which you most likely want at the end of each URL: http://www.something.com/*)
<br/>For the full URL filter syntax, see: <a href="https://code.google.com/chrome/extensions/match_patterns.html"
target="_blank">https://code.google.com/chrome/extensions/match_patterns.html</a>
<br/>For a reference of CORS headers, see: <a href="http://www.w3.org/TR/cors/#syntax" target="_blank">http://www.w3.org/TR/cors/#syntax</a>
<br/>You can find the full source code for this extension on GitHub: <a href="https://github.com/chrisdeely/ForceCORS">https://github.com/chrisdeely/ForceCORS</a>
<br/>Icon made by <a href="http://www.freepik.com" title="Freepik">Freepik</a> from <a href="http://www.flaticon.com/free-icon/padlock-2_3799" title="Flaticon">www.flaticon.com</a>
</p>
<div class="container-fluid">
<div class="row">
<div class="span4">
<form id="addNewURLForm" action="#">
<label for="newURL">Add URL</label> <input id="newURL" type="text"/>
<button class="btn" type="submit">Add</button>
</form>
</div>
<div class="span8">
<label for="activeURL">Settings for </label>
<select id="activeURL"></select>
<table id="headersTable" class="table table-bordered table-striped">
<thead>
<tr>
<th>Header Name</th>
<th>Header Value</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<button class="btn addHeader">Add Header</button>
</div>
</div>
<label class="checkbox">
<input type="checkbox" id="displayCount" checked="checked"> Display Intercept Count
</label>
<div class="row span12" style="margin-left: 0">
<button class="btn btn-success" id="saveAll">Save All</button>
<button class="btn btn-warning" id="deleteSelected">Delete Selected</button>
<button class="btn btn-danger" id="deleteAll">Delete All</button>
<a id="exportLink" data-toggle="modal" href="#exportModal">Import/Export</a>
</div>
</div>
<div class="row span4 alert alert-block alert-success">Settings saved!</div>
<div class="row span4 alert alert-block alert-error">An error occurred</div>
<div class="modal hide" id="exportModal">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">x</button>
<h3>Import/Export Settings</h3>
<p>Copy/paste the contents below to share settings across browsers</p>
</div>
<div class="modal-body">
<form class="form-vertical">
<div class="control-group">
<label class="control-label" for="exportContents">Current Settings</label>
<span class="help-inline hide">Unable to parse the input as JSON</span>
<textarea id="exportContents">
{code:awesome}
</textarea>
</div>
</form>
</div>
<div class="modal-footer">
<a href="#" class="btn" data-dismiss="modal">Close</a>
<a href="#" class="btn btn-primary">Save changes</a>
</div>
</div>
</body>
</html>