-
Notifications
You must be signed in to change notification settings - Fork 20
/
options.html
93 lines (91 loc) · 4.21 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>ScriptAutoRunner</title>
<link rel="stylesheet" href="css/fontello-embedded.css" media="screen" title="no title" charset="utf-8">
<link rel="stylesheet" href="css/base.css" media="screen" title="no title" charset="utf-8">
<link rel="stylesheet" href="css/options.css" media="screen" title="no title" charset="utf-8">
</head>
<body>
<div class="sra-wrapper" id="app" v-cloak>
<div class="sra-setting">
<i class="icon-cog" v-on:click="toggleSetting"></i>
</div>
<div class="sra-setting__content" v-el:setting>
<div class="sra-setting__container">
<div class="sra-setting__body">
<div class="sra-setting__header">
<i class="icon-cog"></i>
<span>Options</span>
<span v-on:click="toggleSetting"><i class="icon-cancel-circled"></i></span>
</div>
<div class="sra-setting__main">
<div class="sra-flex">
<span><i class="icon-cloud-flash"></i></span>
<span> Exclude hostname</span>
</div>
<textarea v-on:keyup="save" v-model="options .exclude" placeholder="Exclude hostnames, split by comma"></textarea>
</div>
</div>
</div>
</div>
<div class="sra-power" v-bind:class="{'sra-power--off': !power}" v-on:click="toggleSwitch">
<i class="icon-flash"></i>
</div>
<div class="sra-main">
<div class="sra-btns">
<div class="sra-btns__battery">
<i class="icon-battery"></i>
</div>
<div class="sra-btn src-btn--plus">
<i class="icon-plus"></i>
</div>
<button class="sra-btn" v-on:click="addScript('snippet')">
<i class="icon-code"></i>
</button>
<button class="sra-btn" v-on:click="addScript('external')">
<i class="icon-link"></i>
</button>
</div>
<ul class="sra-scripts">
<li class="sra-script" v-bind:class="{'sra-script--enable': script.enable}" v-for="script in scripts">
<div class="sra-script__plug" v-on:click="togglePower($index)"></div>
<div class="sra-script__box">
<div class="sra-script__content">
<div class="sra-flex sra-flex--head">
<input class="sra-script__name" type="text" v-model="script.name">
<div class="sra-script__btns">
<button class="sra-script__btn" v-on:click="moveDown($index)"><i class="icon-down-circled"></i></button>
<button class="sra-script__btn" v-on:click="moveUp($index)"><i class="icon-up-circled"></i></button>
</div>
</div>
<div class="sra-flex sra-flex--content">
<div class="sra-script__type">
<i v-bind:class="{'icon-code': script.type == 'snippet', 'icon-link': script.type == 'external'}"></i>
</div>
<div class="sra-script__snippet" v-if="script.type == 'snippet'">
<textarea v-on:keyup="save" v-model="script.code" placeholder="Write your own code here."></textarea>
</div>
<div class="sra-script__external" v-if="script.type == 'external'">
<input v-on:blur="save" type="text" v-model="script.src" placeholder="Set JS file's URL. (e.g. //code.jquery.com/jquery-2.1.4.min.js)">
</div>
</div>
<div class="sra-flex sra-flex--foot">
<i class="icon-cloud-flash"></i>
<input class="sra-script__host" v-model="script.host" v-on:blur="save" placeholder="Target hostname. By default, target to all host.">
<button class="sra-script__btn remove" v-on:click="removeScript($index)"><i class="icon-trash"></i></button>
</div>
</div>
</div>
<div>
</div>
</li>
</ul>
</div>
</div>
<script src="js/lib/lodash.min.js"></script>
<script src="js/lib/vue.js"></script>
<script src="js/options.js"></script>
</body>
</html>