Skip to content

Commit 3f2a9ad

Browse files
committed
2.0.3
Signed-off-by: magicoflolis <magicoflolis@gmail.com>
1 parent f3b0bc4 commit 3f2a9ad

11 files changed

Lines changed: 67 additions & 78 deletions

File tree

dist/magic-userjs.gf.user.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@
4848
// @exclude *://*myetherwallet.com/*
4949
// @require https://greasyfork.org/scripts/23419-l-js/code/ljs.js
5050
// @require https://greasyfork.org/scripts/23420-userjs-base-js/code/userjs-basejs.js
51-
// @resource uiJs https://github.com/magicoflolis/Userscript-Plus/raw/master/dist/ui.gf.js?_=1624492218750
52-
// @resource ui https://cdn.jsdelivr.net/gh/magicoflolis/Userscript-Plus/dist/ui.html?_=1624492218751
51+
// @resource uiJs https://github.com/magicoflolis/Userscript-Plus/raw/master/dist/ui.gf.js?_=1624504023660
52+
// @resource ui https://cdn.jsdelivr.net/gh/magicoflolis/Userscript-Plus/dist/ui.html?_=1624504023661
5353
// @resource count https://greasyfork.org/scripts/by-site.json
5454
// @resource adult https://sleazyfork.org/scripts/by-site.json
5555
// @grant GM_xmlhttpRequest
@@ -162,7 +162,7 @@ unsafeWindow.GmAjax = GM_xmlhttpRequest;
162162
$('body').append(this.tplBox);
163163
let ui = GM_getResourceText('ui'),
164164
dom = document.getElementsByClassName('jae-userscript')[0],
165-
tpl = '<iframe name="jaeFetchUserJSFrame" src="about:blank" style="width:100%;height:100%;border:0px;display: block!important;" allowTransparency="true"></iframe>';
165+
tpl = '<iframe name="jaeFetchUserJSFrame" src="about:blank" style="width:100%;height:100%;border:0px;display: block!important;border-radius:5px;" allowTransparency="true"></iframe>';
166166
dom.innerHTML = tpl;
167167
let iframeDom = dom.children[0];
168168
iframe.write(iframeDom, ui);

dist/magic-userjs.user.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@
4848
// @exclude *://*myetherwallet.com/*
4949
// @require https://cdn.jsdelivr.net/gh/jae-jae/l.js/userjs/l.userjs.min.js
5050
// @require https://greasyfork.org/scripts/23420-userjs-base-js/code/userjs-basejs.js
51-
// @resource uiJs https://github.com/magicoflolis/Userscript-Plus/raw/master/dist/ui.js?_=1624492218750
52-
// @resource ui https://cdn.jsdelivr.net/gh/magicoflolis/Userscript-Plus/dist/ui.html?_=1624492218750
51+
// @resource uiJs file:///D:/Docs/Github/Userscript-PlusFirefox/dist/ui.js
52+
// @resource ui https://cdn.jsdelivr.net/gh/magicoflolis/Userscript-Plus/dist/ui.html?_=1624504023660
5353
// @resource count https://greasyfork.org/scripts/by-site.json
5454
// @resource adult https://sleazyfork.org/scripts/by-site.json
5555
// @grant GM_xmlhttpRequest
@@ -162,7 +162,7 @@ unsafeWindow.GmAjax = GM_xmlhttpRequest;
162162
$('body').append(this.tplBox);
163163
let ui = GM_getResourceText('ui'),
164164
dom = document.getElementsByClassName('jae-userscript')[0],
165-
tpl = '<iframe name="jaeFetchUserJSFrame" src="about:blank" style="width:100%;height:100%;border:0px;display: block!important;" allowTransparency="true"></iframe>';
165+
tpl = '<iframe name="jaeFetchUserJSFrame" src="about:blank" style="width:100%;height:100%;border:0px;display: block!important;border-radius:5px;" allowTransparency="true"></iframe>';
166166
dom.innerHTML = tpl;
167167
let iframeDom = dom.children[0];
168168
iframe.write(iframeDom, ui);

dist/ui.gf.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ui.gf.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ui.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ui.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@
1616
},
1717
"homepage": "https://github.com/magicoflolis/Userscript-Plus",
1818
"scripts": {
19+
"build:user": "npm run webpack:user && node webpackConfig/userscript.js",
1920
"dev:browser": "webpack --watch --progress --config=webpackConfig/webpack.config.js",
2021
"webpack:user": "webpack --config=webpackConfig/webpack.ui.config.js && webpack --config=webpackConfig/webpack.gf.config.js",
21-
"build:all": "webpack --mode=production --config=webpackConfig/webpack.config.js && npm run build:user",
22-
"build:user": "npm run webpack:user && node webpackConfig/userscript.js",
23-
"test": "npm run build:all"
22+
"build:all": "webpack --mode=production --config=webpackConfig/webpack.config.js && npm run build:user"
2423
},
2524
"devDependencies": {
2625
"@babel/cli": "^7.14.5",

src/userscript/components/Indicator.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
<template>
1+
<template v-slot:count>
22
<div>
33
<Card class="circle">
4-
<Badge place="count" :count="count" class-name="badge"></Badge>
4+
<Badge :count="count" class-name="badge"></Badge>
55
</Card>
66
</div>
77
</template>
@@ -16,8 +16,7 @@ export default {
1616
.circle {
1717
width: 56px;
1818
height: 56px;
19-
line-height: 56px;
20-
border-radius: 28px;
19+
border-radius: 28px !important;
2120
float: right;
2221
right: 40px;
2322
}
@@ -29,5 +28,6 @@ export default {
2928
height: 26px;
3029
line-height: 26px;
3130
border-radius: 13px;
31+
font-weight: bold;
3232
}
3333
</style>

src/userscript/components/Table.vue

Lines changed: 44 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -2,63 +2,51 @@
22
<div>
33
<transition name="custom-classes-transition" enter-active-class="animated lightSpeedIn">
44
<div v-show="showTitle">
5-
<Card dis-hover :bordered="false" :padding="0">
5+
<Card :padding="0">
66
<div slot="title" class="card-title">
7-
<Icon :type="titleIcon"></Icon>
8-
<span v-if="!showSearchInput" @click="bodySwitch">
9-
<i18n path="table.tips" tag="span">
10-
<template v-slot:count>
11-
<Badge :count="count" style="padding:0px 5px;"></Badge>
12-
</template>
13-
</i18n>
14-
<span v-show="showBody"> - Userscript+ </span>
15-
</span>
16-
<Input v-else v-model="searchInput" icon="android-search" placeholder="Enter title、description、author..." style="width: 450px;height: 25px;"></Input>
7+
<Icon :type="titleIcon"></Icon>
8+
<span v-if="!showSearchInput" @click="bodySwitch">
9+
<i18n path="table.tips" tag="span">
10+
<template v-slot:count>
11+
<Badge :count="count" style="padding:0px 5px;"></Badge>
12+
</template>
13+
</i18n>
14+
<span v-show="showBody"> - Userscript+</span>
15+
</span>
16+
<Input v-else v-model="searchInput" icon="android-search" placeholder="Enter title、description、author..." style="width: 450px;height: 25px;"></Input>
1717
</div>
1818
<div slot="extra">
1919
<span v-show="showBody">
2020
<Tooltip :content="$t('table.search')" placement="bottom">
21-
<Button type="default" @click="showSearchInput = !showSearchInput" style="background-color: #2e323d">
22-
<Icon type="android-search" color="white"></Icon>
23-
</Button>
21+
<Button icon="android-search" type="default" @click="showSearchInput = !showSearchInput"></Button>
2422
</Tooltip>
2523
<Tooltip :content="$t('table.issue')" placement="bottom">
26-
<Button type="default" @click="open('https://github.com/magicoflolis/Userscript-Plus/issues/new')" style="background-color: #2e323d">
27-
<Icon type="bug" color="white"></Icon>
28-
</Button>
24+
<Button icon="bug" type="default" @click="open('https://github.com/magicoflolis/Userscript-Plus/issues/new')"></Button>
2925
</Tooltip>
3026
<Tooltip :content="$t('table.home')" placement="bottom">
31-
<Button type="default" @click="open('https://github.com/magicoflolis/Userscript-Plus')" style="background-color: #2e323d">
32-
<Icon type="home" color="white"></Icon>
33-
</Button>
27+
<Button icon="home" type="default" @click="open('https://github.com/magicoflolis/Userscript-Plus#readme')"></Button>
3428
</Tooltip>
3529
<Tooltip :content="$t('table.og')" placement="bottom">
36-
<Button type="default" @click="open('https://github.com/jae-jae/Userscript-Plus#readme')" style="background-color: #2e323d">
37-
<Icon type="fork" color="white"></Icon>
38-
</Button>
30+
<Button icon="fork" type="default" @click="open('https://github.com/jae-jae/Userscript-Plus#readme')"></Button>
3931
</Tooltip>
4032
</span>
4133
<Tooltip :content="$t('table.close')" placement="left">
42-
<Button type="default" @click="close" style="background-color: #2e323d">
43-
<Icon type="close-round" color="white"></Icon>
44-
</Button>
34+
<Button icon="close-round" type="default" @click="close"></Button>
4535
</Tooltip>
4636
</div>
4737
<transition name="custom-classes-transition" enter-active-class="animated lightSpeedIn" leave-active-class="animated bounceOutRight">
4838
<div v-show="showBody">
49-
<Table highlight-row :columns="columns" :data="data"></Table>
50-
<div class="table-footer"> </div>
39+
<Table highlight-row :columns="columns" :data="data"></Table>
40+
<div class="table-footer"> </div>
5141
</div>
5242
</transition>
5343
</Card>
5444
</div>
5545
</transition>
5646
<div v-show="!showTitle" @mouseover='showTitle = true'>
57-
<Indicator :count="count"></Indicator>
47+
<Indicator :count="count"></Indicator>
5848
</div>
5949
</div>
60-
61-
6250
</template>
6351

6452
<script>
@@ -184,7 +172,7 @@
184172
showBody (val) {
185173
(val) ? (this.titleIcon = 'chevron-down',Tools.dispatchEvent('max')) : (this.titleIcon = 'chevron-up',Tools.dispatchEvent('min'))
186174
// Tools.dispatchEvent('resize')
187-
// window.dispatchEvent(new Event('resize'))
175+
window.dispatchEvent(new Event('resize'))
188176
},
189177
searchInput: function (val) {
190178
(val) ? (val = val.toLowerCase(),this.data = Tools.searcher(this.originData, val)) : (this.data = this.originData)
@@ -204,22 +192,17 @@
204192
})
205193
},
206194
bodySwitch () {
207-
(this.data.length === 0 && this.showBody === false) ? (
195+
(!this.data.length && !this.showBody) ? (
208196
this.$Spin.show(),
209197
Tools.dispatchEvent('loading'),
210198
Tools.getData((json) => {
211199
this.originData = json
212200
this.data = json
213201
this.$Spin.hide()
214-
this.showBody = !this.showBody
215-
new Promise((resolve) => setTimeout(resolve, 500))
216-
this.showTitle = this.showBody
217-
})
218-
) : (
219-
this.showBody = !this.showBody,
220-
new Promise((resolve) => setTimeout(resolve, 500)),
202+
}) ) : false
203+
this.showBody = !this.showBody
204+
new Promise((resolve) => setTimeout(resolve, 500))
221205
this.showTitle = this.showBody
222-
)
223206
},
224207
open (url) {
225208
window.open(url)
@@ -230,29 +213,25 @@
230213

231214
<style>
232215
*:not(select) {
233-
scrollbar-color: #ffffff #2e323d;
234-
scrollbar-width: thin;
216+
scrollbar-color: #2d8cf0 #ffffff;
217+
}
218+
::-webkit-scrollbar-thumb {
219+
background: #2d8cf0;
220+
}
221+
::-webkit-scrollbar-track {
222+
background-color: #ffffff;
235223
}
236224
/* Chrome and derivatives*/
237225
::-webkit-scrollbar {
238226
max-width: 8px !important;
239227
max-height: 8px !important;
240228
}
241-
::-webkit-scrollbar-thumb {
242-
background: #ffffff;
243-
}
244-
::-webkit-scrollbar-track {
245-
background-color: #2e323d;
246-
}
247229
.card-title {
248230
cursor: pointer;
249-
color: #ffffff !important;
250231
}
251232
.ivu-card-head {
252-
border-bottom: 1px solid #ffffff !important;
253-
}
254-
.ivu-card-extra {
255-
top: 8px;
233+
line-height: 2 !important;
234+
min-height: 54px !important;
256235
}
257236
.ivu-table-body {
258237
height: 400px;
@@ -268,12 +247,20 @@
268247
.table-footer a {
269248
color: #ed3f14;
270249
}
250+
/* dark theme */
251+
/*
252+
.card-title {
253+
color: #ffffff !important;
254+
}
255+
.ivu-card-head {
256+
border-bottom: 1px solid #ffffff !important;
257+
}
271258
.ivu-tooltip {
272259
border-color: #ffffff !important;
273260
border-radius: 4px !important;
274261
background-color: #ffffff !important;
275262
}
276-
.ivu-table {
263+
.ivu-btn-icon-only, .ivu-table {
277264
color: #ffffff !important;
278265
background-color: #2e323d !important;
279266
}
@@ -283,5 +270,5 @@
283270
}
284271
.ivu-table-row-highlight, .ivu-table-row-hover {
285272
color: #9cc3e7 !important;
286-
}
287-
</style>
273+
} */
274+
</style>

userscript/main.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ class FetchUserjs {
3535

3636
setSize(w, h) {
3737
$('.jae-userscript').css({
38-
width: w,
39-
height: h
38+
width: w,
39+
height: h
4040
})
4141
}
4242

@@ -92,7 +92,7 @@ class FetchUserjs {
9292

9393
let ui = GM_getResourceText('ui'),
9494
dom = document.getElementsByClassName('jae-userscript')[0],
95-
tpl = '<iframe name="jaeFetchUserJSFrame" src="about:blank" style="width:100%;height:100%;border:0px;display: block!important;" allowTransparency="true"></iframe>';
95+
tpl = '<iframe name="jaeFetchUserJSFrame" src="about:blank" style="width:100%;height:100%;border:0px;display: block!important;border-radius:5px;" allowTransparency="true"></iframe>';
9696
dom.innerHTML = tpl;
9797
let iframeDom = dom.children[0];
9898
iframe.write(iframeDom, ui);

0 commit comments

Comments
 (0)