-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathedit.html
335 lines (323 loc) · 18.3 KB
/
edit.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
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" href="images/128.png">
<link rel="stylesheet" href="third-party/material-design-icons/material-icons.min.css"/>
<link rel="stylesheet" href="third-party/mdl/material.min.css"/>
<link rel="stylesheet" href="styles/page.css"/>
<script src="scripts/browser-polyfill.js"></script>
<script src="scripts/common.js"></script>
<script src="scripts/userstyle.js"></script>
<script src="scripts/page/GhostText.js"></script>
<script src="third-party/less/less.min.js"></script>
<script src="third-party/clean-css/clean-css.min.js"></script>
<script src="third-party/codemirror/lib/codemirror.js"></script>
<link rel="stylesheet" href="third-party/codemirror/lib/codemirror.css">
<script src="third-party/codemirror/mode/css/css.js"></script>
<link rel="stylesheet" href="third-party/codemirror/addon/dialog/dialog.css">
<link rel="stylesheet" href="third-party/codemirror/addon/search/matchesonscrollbar.css">
<script src="third-party/codemirror/addon/scroll/annotatescrollbar.js"></script>
<script src="third-party/codemirror/addon/search/matchesonscrollbar.js"></script>
<script src="third-party/codemirror/addon/dialog/dialog.js"></script>
<script src="third-party/codemirror/addon/search/searchcursor.js"></script>
<script src="third-party/codemirror/addon/search/search.js"></script>
<script src="third-party/codemirror/addon/comment/comment.js"></script>
<script src="third-party/codemirror/addon/selection/active-line.js"></script>
<link rel="stylesheet" href="third-party/codemirror/addon/fold/foldgutter.css" />
<script src="third-party/codemirror/addon/fold/foldcode.js"></script>
<script src="third-party/codemirror/addon/fold/foldgutter.js"></script>
<script src="third-party/codemirror/addon/fold/brace-fold.js"></script>
<script src="third-party/codemirror/addon/fold/comment-fold.js"></script>
<script src="third-party/codemirror/addon/edit/matchbrackets.js"></script>
<link rel="stylesheet" href="third-party/codemirror/addon/lint/lint.css" />
<script src="third-party/stylelint/stylelint-bundle.min.js"></script>
<script src="third-party/codemirror/addon/lint/lint.js"></script>
<script src="third-party/stylelint/codemirror.js"></script>
<link rel="stylesheet" href="third-party/codemirror/addon/hint/show-hint.css" />
<script src="third-party/codemirror/addon/hint/show-hint.js"></script>
<script src="third-party/codemirror/addon/hint/css-hint.js"></script>
<script src="third-party/codemirror/addon/hint/anyword-hint.js"></script>
<script src="third-party/codemirror/keymap/sublime.js"></script>
<script src="third-party/codemirror/keymap/emacs.js"></script>
<script src="third-party/codemirror/keymap/vim.js"></script>
<link rel="stylesheet" href="third-party/colorpicker/colorpicker.css" />
<script type="text/javascript" src="third-party/colorpicker/colorpicker.js" ></script>
<script type="text/javascript" src="third-party/colorpicker/colorview.js" ></script>
<link rel="stylesheet" href="styles/page/edit.css"/>
<style id="font-style"></style>
<template data-id="find">
<span i18n-text="search">: <input type="text" class="CodeMirror-search-field">
<span class="CodeMirror-search-hint">(<span i18n-text="searchRegexp"></span>)</span>
</span>
</template>
<template data-id="replace">
<span i18n-text="replace">: <input type="text" class="CodeMirror-search-field">
<span class="CodeMirror-search-hint">(<span i18n-text="searchRegexp"></span>)</span>
</span>
</template>
<template data-id="replaceAll">
<span i18n-text="replaceAll">: <input type="text" class="CodeMirror-search-field">
<span class="CodeMirror-search-hint">(<span i18n-text="searchRegexp"></span>)</span>
</span>
</template>
<template data-id="replaceWith">
<span i18n-text="replaceWith">: <input type="text" class="CodeMirror-search-field">
</span>
</template>
<template data-id="replaceConfirm">
<span i18n-text="replace">?
<button i18n-text="confirmYes"></button>
<button i18n-text="confirmNo"></button>
<button i18n-text="confirmStop"></button>
</span>
</template>
<template data-id="jumpToLine">
<span i18n-text="editGotoLine">: <input class="CodeMirror-jump-field" type="text"></span>
</template>
<template data-id="lintItem">
<li class="mdl-list__item mdl-list__item--two-line">
<span class="mdl-list__item-primary-content">
<span><i class="severity CodeMirror-lint-marker-{{severity}}"></i>Line <span class="line">{{line}}</span> col <span class="col">{{col}}</span></span>
<span class="mdl-list__item-sub-title" title="{{message}}">{{message}}</span>
</span>
</li>
</template>
<template data-id="advancedText">
<div class="mdl-grid" data-advanced="text">
<div class="mdl-textfield mdl-textfield--floating-label mdl-cell mdl-cell--2-col">
<input class="mdl-textfield__input key" type="text" pattern="([a-zA-Z0-9_\-]+)">
<label class="mdl-textfield__label" i18n-text="advancedName"></label>
</div>
<div class="mdl-textfield mdl-textfield--floating-label mdl-cell mdl-cell--2-col">
<input class="mdl-textfield__input title" type="text">
<label class="mdl-textfield__label" i18n-text="advancedDisplayName"></label>
</div>
<div class="mdl-textfield mdl-textfield--floating-label mdl-cell mdl-cell--7-col">
<input class="mdl-textfield__input default" type="text">
<label class="mdl-textfield__label" i18n-text="advancedDefault"></label>
</div>
<div class="mdl-cell mdl-cell--1-col"><button class="mdl-button mdl-js-button mdl-js-ripple-effect remove-top" i18n-text="advancedDelete"></button></div>
</div>
</template>
<template data-id="advancedColor">
<div class="mdl-grid" data-advanced="color">
<div class="mdl-textfield mdl-textfield--floating-label mdl-cell mdl-cell--2-col">
<input class="mdl-textfield__input key" type="text" pattern="([a-zA-Z0-9_\-]+)">
<label class="mdl-textfield__label" i18n-text="advancedName"></label>
</div>
<div class="mdl-textfield mdl-textfield--floating-label mdl-cell mdl-cell--2-col">
<input class="mdl-textfield__input title" type="text">
<label class="mdl-textfield__label" i18n-text="advancedDisplayName"></label>
</div>
<div class="mdl-cell--7-col color">
<label><span i18n-text="advancedDefault"></span> <input type="color" class="default"></label>
</div>
<div class="mdl-cell mdl-cell--1-col"><button class="mdl-button mdl-js-button mdl-js-ripple-effect remove-top" i18n-text="advancedDelete"></button></div>
</div>
</template>
<template data-id="advancedDropdown">
<div class="mdl-grid" data-advanced="dropdown">
<div class="mdl-cell mdl-cell--1-col">
<div class="mdl-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input key" type="text" pattern="([a-zA-Z0-9_\-]+)">
<label class="mdl-textfield__label" i18n-text="advancedName"></label>
</div>
<button class="mdl-button mdl-js-button mdl-js-ripple-effect remove-top" i18n-text="advancedDelete"></button>
</div>
<div class="mdl-cell mdl-cell--1-col">
<div class="mdl-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input title" type="text">
<label class="mdl-textfield__label" i18n-text="advancedDisplayName"></label>
</div>
</div>
<div class="mdl-cell mdl-cell--10-col"><div class="options"></div><button class="mdl-button mdl-js-button mdl-js-ripple-effect add" i18n-text="advancedAdd"></button></div>
</div>
</template>
<template data-id="advancedDropdownItem">
<div class="mdl-grid dropdown-item">
<div class="mdl-textfield mdl-textfield--floating-label mdl-cell mdl-cell--5-col">
<input class="mdl-textfield__input item-key" type="text" pattern="([a-zA-Z0-9_\-]+)">
<label class="mdl-textfield__label" i18n-text="advancedName"></label>
</div>
<div class="mdl-textfield mdl-textfield--floating-label mdl-cell mdl-cell--5-col">
<input class="mdl-textfield__input item-title" type="text">
<label class="mdl-textfield__label" i18n-text="advancedDisplayName"></label>
</div>
<div class="mdl-cell mdl-cell--2-col"><button class="mdl-button mdl-js-button mdl-js-ripple-effect remove" i18n-text="advancedDelete"></button></div>
<div class="mdl-cell--12-col"><textarea></textarea></div>
</div>
</template>
<template data-id="advancedImage">
<div class="mdl-grid" data-advanced="image">
<div class="mdl-cell mdl-cell--1-col">
<div class="mdl-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input key" type="text" pattern="([a-zA-Z0-9_\-]+)">
<label class="mdl-textfield__label" i18n-text="advancedName"></label>
</div>
<button class="mdl-button mdl-js-button mdl-js-ripple-effect remove-top" i18n-text="advancedDelete"></button>
</div>
<div class="mdl-cell mdl-cell--1-col">
<div class="mdl-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input title" type="text">
<label class="mdl-textfield__label" i18n-text="advancedDisplayName"></label>
</div>
</div>
<div class="mdl-cell mdl-cell--10-col"><div class="options"></div><button class="mdl-button mdl-js-button mdl-js-ripple-effect add" i18n-text="advancedAdd"></button></div>
</div>
</template>
<template data-id="advancedImageItem">
<div class="mdl-grid image-item">
<div class="mdl-textfield mdl-textfield--floating-label mdl-cell mdl-cell--2-col">
<input class="mdl-textfield__input item-key" type="text" pattern="([a-zA-Z0-9_\-]+)">
<label class="mdl-textfield__label" i18n-text="advancedName"></label>
</div>
<div class="mdl-textfield mdl-textfield--floating-label mdl-cell mdl-cell--2-col">
<input class="mdl-textfield__input item-title" type="text">
<label class="mdl-textfield__label" i18n-text="advancedDisplayName"></label>
</div>
<div class="mdl-textfield mdl-textfield--floating-label mdl-cell mdl-cell--7-col">
<input class="mdl-textfield__input item-value" type="text">
<label class="mdl-textfield__label">URL</label>
</div>
<div class="mdl-cell mdl-cell--1-col"><button class="mdl-button mdl-js-button mdl-js-ripple-effect remove" i18n-text="advancedDelete"></button></div>
</div>
</template>
<script src="scripts/storage.js"></script>
<script src="scripts/messaging.js"></script>
<script src="scripts/localization.js"></script>
<script src="scripts/inject/apply.js"></script>
<script src="scripts/page/edit.js"></script>
</head>
<body id="xstyle-edit">
<div class="mdl-layout mdl-js-layout mdl-layout--fixed-header">
<header class="mdl-layout__header">
<div class="mdl-layout__header-row">
<a id="back-button" role="button" tabindex="0" class="mdl-layout__drawer-button" href="manage.html"><i class="material-icons">arrow_back</i></a>
<span id="heading" class="mdl-layout-title"></span>
<div class="mdl-layout-spacer"></div>
</div>
</header>
<main class="mdl-layout__content">
<div id="main-loading" class="page-content">
<div class="mdl-spinner mdl-js-spinner is-active"></div>
</div>
<div id="main-content" class="page-content" style="display:none">
<div class="left-section">
<div class="mdl-card mdl-shadow--2dp code-area">
<div class="mdl-card__supporting-text">
<textarea id="code" class="code"></textarea>
</div>
</div>
<!-- advanced -->
<div id="advanced-box" class="mdl-card mdl-shadow--2dp close">
<div class="mdl-card__title mdl-card--expand">
<h2 class="mdl-card__title-text" i18n-text="advancedTitle"></h2>
</div>
<div id="advanced" class="mdl-card__supporting-text"></div>
<div class="mdl-card__actions mdl-card--border">
<button class="mdl-button mdl-js-button mdl-js-ripple-effect advanced-add-dropdown" i18n-text="advancedAddDropdown"></button>
<button class="mdl-button mdl-js-button mdl-js-ripple-effect advanced-add-image" i18n-text="advancedAddImage"></button>
<button class="mdl-button mdl-js-button mdl-js-ripple-effect advanced-add-text" i18n-text="advancedAddText"></button>
<button class="mdl-button mdl-js-button mdl-js-ripple-effect advanced-add-color" i18n-text="advancedAddColor"></button>
</div>
<div class="mdl-card__menu">
<button id="toggle-advanced" class="mdl-button mdl-js-button mdl-button--icon"><i class="material-icons">keyboard_arrow_up</i></button>
</div>
</div>
</div>
<div class="right-section mdl-card mdl-shadow--2dp">
<div class="mdl-card__supporting-text mdl-tabs mdl-js-tabs mdl-js-ripple-effect">
<div class="mdl-tabs__tab-bar">
<a href="#style-panel" class="mdl-tabs__tab is-active"><i class="material-icons">style</i></a>
<a href="#editor-panel" class="mdl-tabs__tab"><i class="material-icons">edit</i></a>
<a href="#issue-panel" class="mdl-tabs__tab"><i class="material-icons">error</i></a>
</div>
<div class="mdl-tabs__panel is-active" id="style-panel">
<div class="mdl-textfield mdl-textfield--floating-label style-name-box">
<input class="mdl-textfield__input style-contributor" type="text" id="name">
<label class="mdl-textfield__label" for="name" i18n-text="styleName"></label>
</div>
<div class="mdl-textfield mdl-textfield--floating-label style-update-url-box">
<input class="mdl-textfield__input style-contributor" type="text" id="update-url">
<label class="mdl-textfield__label" for="update-url">Update URL</label>
</div>
<label class="mdl-checkbox" id="enabled-label" for="enabled">
<input type="checkbox" id="enabled" class="mdl-checkbox__input style-contributor">
<span class="mdl-checkbox__label" i18n-text="styleEnabledLabel"></span>
</label>
<label class="mdl-checkbox" id="enabled-less-label" for="enabled-less">
<input type="checkbox" id="enabled-less" class="mdl-checkbox__input style-contributor" checked>
<span class="mdl-checkbox__label" i18n-text="enableLess"></span>
</label>
<button class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect" id="save-link" title="Ctrl-S"><span i18n-text="save"></span><div class="loading mdl-spinner mdl-js-spinner is-active"></div></button>
<button class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect" id="beautify" i18n-text="styleBeautify"></button>
</div>
<div class="mdl-tabs__panel" id="editor-panel">
<label class="mdl-checkbox mdl-js-ripple-effect" id="lineWrapping-label" for="editor.lineWrapping">
<input type="checkbox" data-option="lineWrapping" id="editor.lineWrapping" class="mdl-checkbox__input">
<span class="mdl-checkbox__label" i18n-text="cm_lineWrapping"></span>
</label>
<label class="mdl-checkbox mdl-js-ripple-effect" id="smartIndent-label" for="editor.smartIndent">
<input type="checkbox" data-option="smartIndent" id="editor.smartIndent" class="mdl-checkbox__input">
<span class="mdl-checkbox__label" i18n-text="cm_smartIndent"></span>
</label>
<label class="mdl-checkbox mdl-js-ripple-effect" id="indentWithTabs-label" for="editor.indentWithTabs">
<input type="checkbox" data-option="indentWithTabs" id="editor.indentWithTabs" class="mdl-checkbox__input">
<span class="mdl-checkbox__label" i18n-text="cm_indentWithTabs"></span>
</label>
<div class="option">
<label id="keyMap-label" for="editor.keyMap" i18n-text="cm_keyMap"></label>
<select data-option="keyMap" id="editor.keyMap"></select>
<i id="keyMap-help" class="help-button material-icons" i18n-title="helpAlt">help_outline</i>
</div>
<div class="option">
<label id="theme-label" for="editor.theme" i18n-text="cm_theme"></label>
<select data-option="theme" id="editor.theme"></select>
</div>
<div class="option">
<label id="fontName-label" for="editor.fontName" i18n-text="fontName"></label>
<select data-option="fontName" id="editor.fontName"></select>
</div>
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" data-option="tabSize" id="editor.tabSize" type="number" min="0">
<label class="mdl-textfield__label" id="tabSize-label" for="editor.tabSize" i18n-text="cm_tabSize"></label>
</div>
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" data-option="fontSize" id="editor.fontSize" type="number" min="10">
<label class="mdl-textfield__label" id="fontSize-label" for="editor.fontSize" i18n-text="fontSize"></label>
</div>
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" data-option="initAdvanced" id="editor.initAdvanced" type="number" min="0">
<label class="mdl-textfield__label" id="fontSize-label" for="editor.initAdvanced" i18n-text="advancedInitMax"></label>
</div>
<div i18n-text="advancedInitMaxHelp"></div>
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
<input class="mdl-textfield__input" data-option="GhostTextPort" id="editor.gt.port" type="number" min="0">
<label class="mdl-textfield__label" id="tabSize-label" for="editor.gt.port" i18n-text="GT_port"></label>
</div>
<button class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect" id="gt_connect"><span class="title" i18n-text="GT_connect"></span><div class="loading mdl-spinner mdl-js-spinner is-active"></div></button>
</div>
<div class="mdl-tabs__panel" id="issue-panel">
<section id="lint">
<p class="title" i18n-text="issues">: <span id="issue-count">0</span><i id="lint-help" class="material-icons help-button" i18n-title="helpAlt">help_outline</i></p>
<div class="code-list"></div>
</section>
</div>
</div>
</div>
</div>
</main>
</div>
<div id="toast" class="mdl-js-snackbar mdl-snackbar">
<div class="mdl-snackbar__text"></div>
<button class="mdl-snackbar__action" type="button"></button>
</div>
<div id="help-popup">
<div class="title"></div><div class="close-icon"></div>
<div class="contents"></div>
</div>
<script src="third-party/mdl/material.min.js"></script>
</body>
</html>