| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,7 +3,7 @@ | |||
| 3 | 3 | // @name:zh Userscript+ : 显示当前网站所有可用的UserJS脚本 Jaeger | |
| 4 | 4 | // @name:zh-CN Userscript+ : 显示当前网站所有可用的UserJS脚本 Jaeger | |
| 5 | 5 | // @namespace https://github.com/jae-jae/Userscript-Plus | |
| 6 | - // @version 2.0.2 | ||
| 6 | + // @version 2.1.0 | ||
| 7 | 7 | // @description Show current site all UserJS,The easier way to install UserJs for Tampermonkey. | |
| 8 | 8 | // @description:zh 显示当前网站的所有可用UserJS(Tampermonkey)脚本,交流QQ群:104267383 | |
| 9 | 9 | // @description:zh-CN 显示当前网站的所有可用UserJS(Tampermonkey)脚本,交流QQ群:104267383 | |
@@ -42,7 +42,55 @@ var inline_src = (<><![CDATA[ | |||
| 42 | 42 | this.showTime = 10; | |
| 43 | 43 | this.quietKey = 'jae_fetch_userjs_quiet'; | |
| 44 | 44 | this.cacheKey = 'jae_fetch_userjs_cache'; | |
| 45 | - this.tplBox = '<div id="jae_fetch_userjs_wrapper"><style> #jae_fetch_userjs { position: fixed; width: 370px; bottom: 10px; right: 20px; z-index: 9999999999; height: 51px;box-shadow: 0px 1px 4px rgba(0,0,0,0.3),\t\t\t\t0px 0px 20px rgba(0,0,0,0.1) inset; }#jae_fetch_userjs::before,#jae_fetch_userjs::after { content:""; position:absolute; z-index:-1;}#jae_fetch_userjs::before,#jae_fetch_userjs::after { content:""; position:absolute; z-index:-1; bottom:15px; left:10px; width:50%; height:20%;}#jae_fetch_userjs::before,#jae_fetch_userjs::after { content:""; position:absolute; z-index:-1; bottom:15px; left:10px; width:50%; height:20%; box-shadow:0 15px 10px rgba(0, 0, 0, 0.7); transform:rotate(-3deg);}#jae_fetch_userjs::after{ right:10px; left:auto; transform:rotate(3deg); }</style><div id="jae_fetch_userjs" class=""></div></div>'; | ||
| 45 | + //this.tplBox = '<div id="jae_fetch_userjs_wrapper"><style> #jae_fetch_userjs { position: fixed; width: 370px; bottom: 10px; right: 20px; z-index: 9999999999; height: 56px;box-shadow: 0px 1px 4px rgba(0,0,0,0.3),\t\t\t\t0px 0px 20px rgba(0,0,0,0.1) inset; }#jae_fetch_userjs::before,#jae_fetch_userjs::after { content:""; position:absolute; z-index:-1;}#jae_fetch_userjs::before,#jae_fetch_userjs::after { content:""; position:absolute; z-index:-1; bottom:15px; left:10px; width:50%; height:20%;}#jae_fetch_userjs::before,#jae_fetch_userjs::after { content:""; position:absolute; z-index:-1; bottom:15px; left:10px; width:50%; height:20%; box-shadow:0 15px 10px rgba(0, 0, 0, 0.7); transform:rotate(-3deg);}#jae_fetch_userjs::after{ right:10px; left:auto; transform:rotate(3deg); }</style><div id="jae_fetch_userjs" class=""></div></div>'; | ||
| 46 | + this.tplBox = ` | ||
| 47 | + <div id="jae_userscript_box"> | ||
| 48 | + <style> | ||
| 49 | + .jae-userscript { | ||
| 50 | + position: fixed; | ||
| 51 | + width: 370px; | ||
| 52 | + bottom: 10px; | ||
| 53 | + right: 20px; | ||
| 54 | + z-index: 9999999999; | ||
| 55 | + height: 56px; | ||
| 56 | + } | ||
| 57 | + .jae-userscript-shadow{ | ||
| 58 | + box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.3), \\t\\t\\t\\t0px 0px 20px rgba(0, 0, 0, 0.1) inset; | ||
| 59 | + } | ||
| 60 | + .jae-userscript-shadow::before, .jae-userscript-shadow::after { | ||
| 61 | + content:""; | ||
| 62 | + position:absolute; | ||
| 63 | + z-index:-1; | ||
| 64 | + } | ||
| 65 | + .jae-userscript-shadow::before, .jae-userscript-shadow::after { | ||
| 66 | + content:""; | ||
| 67 | + position:absolute; | ||
| 68 | + z-index:-1; | ||
| 69 | + bottom:15px; | ||
| 70 | + left:10px; | ||
| 71 | + width:50%; | ||
| 72 | + height:20%; | ||
| 73 | + } | ||
| 74 | + .jae-userscript-shadow::before, .jae-userscript-shadow::after { | ||
| 75 | + content:""; | ||
| 76 | + position:absolute; | ||
| 77 | + z-index:-1; | ||
| 78 | + bottom:15px; | ||
| 79 | + left:10px; | ||
| 80 | + width:50%; | ||
| 81 | + height:20%; | ||
| 82 | + box-shadow:0 15px 10px rgba(0, 0, 0, 0.7); | ||
| 83 | + transform:rotate(-3deg); | ||
| 84 | + } | ||
| 85 | + .jae-userscript-shadow::after { | ||
| 86 | + right:10px; | ||
| 87 | + left:auto; | ||
| 88 | + transform:rotate(3deg); | ||
| 89 | + } | ||
| 90 | + </style> | ||
| 91 | + <div class="jae-userscript" class=""></div> | ||
| 92 | + </div> | ||
| 93 | + ` | ||
| 46 | 94 | } | |
| 47 | 95 | ||
| 48 | 96 | getJSON(url,callback){ | |
@@ -76,32 +124,34 @@ var inline_src = (<><![CDATA[ | |||
| 76 | 124 | } | |
| 77 | 125 | ||
| 78 | 126 | setSize(w,h){ | |
| 79 | - $('#jae_fetch_userjs').css({width:w,height:h}) | ||
| 127 | + $('.jae-userscript').css({width:w,height:h}) | ||
| 80 | 128 | } | |
| 81 | 129 | ||
| 82 | 130 | addEventListener(eventName,handler){ | |
| 83 | - document.getElementById('jae_fetch_userjs').addEventListener(eventName,handler) | ||
| 131 | + document.getElementById('jae_userscript_box').addEventListener(eventName,handler) | ||
| 84 | 132 | } | |
| 85 | 133 | ||
| 86 | 134 | bindEvent(){ | |
| 87 | 135 | this.timeId = setTimeout(()=>{ | |
| 88 | - $('#jae_fetch_userjs_wrapper').remove(); | ||
| 136 | + $('#jae_userscript_box').remove(); | ||
| 89 | 137 | },this.showTime*1000); | |
| 90 | 138 | ||
| 91 | 139 | this.addEventListener('max',()=>{ | |
| 92 | 140 | this.setSize(860,492) | |
| 141 | + $('.jae-userscript').addClass('jae-userscript-shadow') | ||
| 93 | 142 | clearTimeout(this.timeId); | |
| 94 | 143 | }) | |
| 95 | 144 | ||
| 96 | 145 | this.addEventListener('min',()=>{ | |
| 97 | 146 | setTimeout(()=>{ | |
| 98 | - this.setSize(370,51) | ||
| 147 | + $('.jae-userscript').removeClass('jae-userscript-shadow') | ||
| 148 | + this.setSize(370,56) | ||
| 99 | 149 | },500) | |
| 100 | 150 | }) | |
| 101 | 151 | ||
| 102 | 152 | this.addEventListener('close',()=>{ | |
| 103 | 153 | sessionStorage.setItem(this.quietKey,1); | |
| 104 | - $('#jae_fetch_userjs_wrapper').remove(); | ||
| 154 | + $('#jae_userscript_box').remove(); | ||
| 105 | 155 | }) | |
| 106 | 156 | } | |
| 107 | 157 | ||
@@ -124,7 +174,7 @@ var inline_src = (<><![CDATA[ | |||
| 124 | 174 | $('body').append(this.tplBox); | |
| 125 | 175 | ||
| 126 | 176 | let ui = GM_getResourceText('ui'); | |
| 127 | - let dom = document.getElementById('jae_fetch_userjs') | ||
| 177 | + let dom = document.getElementsByClassName('jae-userscript')[0] | ||
| 128 | 178 | var tpl = '<iframe name="jaeFetchUserJSFrame" src="about:blank" style="width:100%;height:100%;border:0px;display: block!important;" allowTransparency="true"></iframe>'; | |
| 129 | 179 | dom.innerHTML = tpl; | |
| 130 | 180 | var iframeDom = dom.children[0]; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -13,7 +13,7 @@ export default { | |||
| 13 | 13 | link.click() | |
| 14 | 14 | }, | |
| 15 | 15 | dispatchEvent (eventName) { | |
| 16 | - parent.document.getElementById('jae_fetch_userjs').dispatchEvent(new Event(eventName)) | ||
| 16 | + parent.document.getElementById('jae_userscript_box').dispatchEvent(new Event(eventName)) | ||
| 17 | 17 | }, | |
| 18 | 18 | // 获取油猴缓存好的脚本数据 | |
| 19 | 19 | getData () { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,34 @@ | |||
| 1 | + <template> | ||
| 2 | + <div> | ||
| 3 | + <Card class="circle"> | ||
| 4 | + <Badge place="count" :count="count" class-name="badge"></Badge> | ||
| 5 | + </Card> | ||
| 6 | + </div> | ||
| 7 | + | ||
| 8 | + </template> | ||
| 9 | + | ||
| 10 | + <script> | ||
| 11 | + export default { | ||
| 12 | + props:['count'] | ||
| 13 | + } | ||
| 14 | + </script> | ||
| 15 | + | ||
| 16 | + <style> | ||
| 17 | + .circle { | ||
| 18 | + width: 56px; | ||
| 19 | + height: 56px; | ||
| 20 | + line-height: 56px; | ||
| 21 | + border-radius: 28px; | ||
| 22 | + float: right; | ||
| 23 | + right: 40px; | ||
| 24 | + } | ||
| 25 | + | ||
| 26 | + .badge{ | ||
| 27 | + top:-17px; | ||
| 28 | + left: -6%; | ||
| 29 | + width: 26px; | ||
| 30 | + height: 26px; | ||
| 31 | + line-height: 26px; | ||
| 32 | + border-radius: 13px; | ||
| 33 | + } | ||
| 34 | + </style> | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,17 +1,19 @@ | |||
| 1 | 1 | <template> | |
| 2 | 2 | <div> | |
| 3 | - <Card :padding="0"> | ||
| 4 | - <div slot="title" @click="bodySwitch" class="card-title"> | ||
| 5 | - <Icon :type="titleIcon"></Icon> | ||
| 6 | - <!--<span>发现 <Badge :count="count"></Badge> 个脚本适用于当前页面</span>--> | ||
| 7 | - <i18n path="table.tips" tag="span"> | ||
| 8 | - <Badge place="count" :count="count" style="padding:0px 5px;"></Badge> | ||
| 9 | - </i18n> | ||
| 10 | - <span v-show="showBody"> | ||
| 3 | + <transition name="custom-classes-transition" enter-active-class="animated lightSpeedIn"> | ||
| 4 | + <div v-show="showTitle"> | ||
| 5 | + <Card :padding="0"> | ||
| 6 | + <div slot="title" @click="bodySwitch" class="card-title"> | ||
| 7 | + <Icon :type="titleIcon"></Icon> | ||
| 8 | + <!--<span>发现 <Badge :count="count"></Badge> 个脚本适用于当前页面</span>--> | ||
| 9 | + <i18n path="table.tips" tag="span"> | ||
| 10 | + <Badge place="count" :count="count" style="padding:0px 5px;"></Badge> | ||
| 11 | + </i18n> | ||
| 12 | + <span v-show="showBody"> | ||
| 11 | 13 | - Userscript+ | |
| 12 | 14 | </span> | |
| 13 | - </div> | ||
| 14 | - <div slot="extra"> | ||
| 15 | + </div> | ||
| 16 | + <div slot="extra"> | ||
| 15 | 17 | <span v-show="showBody"> | |
| 16 | 18 | <Tooltip :content="$t('table.feedback')" placement="bottom"> | |
| 17 | 19 | <Button type="dashed" @click="open('https://greasyfork.org/zh-CN/scripts/24508/feedback')"> | |
@@ -38,59 +40,70 @@ | |||
| 38 | 40 | </Tooltip> | |
| 39 | 41 | </span> | |
| 40 | 42 | ||
| 41 | - <Tooltip :content="$t('table.close')" placement="left"> | ||
| 42 | - <Button type="dashed" @click="close"> | ||
| 43 | - <Icon type="close-round"></Icon> | ||
| 44 | - </Button> | ||
| 45 | - </Tooltip> | ||
| 43 | + <Tooltip :content="$t('table.close')" placement="left"> | ||
| 44 | + <Button type="dashed" @click="close"> | ||
| 45 | + <Icon type="close-round"></Icon> | ||
| 46 | + </Button> | ||
| 47 | + </Tooltip> | ||
| 46 | 48 | ||
| 47 | - </div> | ||
| 48 | - <transition name="custom-classes-transition" enter-active-class="animated lightSpeedIn" leave-active-class="animated bounceOutRight"> | ||
| 49 | - <div v-show="showBody"> | ||
| 50 | - <Table highlight-row :columns="columns" :data="data"></Table> | ||
| 51 | 49 | </div> | |
| 52 | - </transition> | ||
| 53 | - </Card> | ||
| 54 | - <Modal v-model="showDonate" width="400"> | ||
| 50 | + <transition name="custom-classes-transition" enter-active-class="animated lightSpeedIn" leave-active-class="animated bounceOutRight"> | ||
| 51 | + <div v-show="showBody"> | ||
| 52 | + <Table highlight-row :columns="columns" :data="data"></Table> | ||
| 53 | + </div> | ||
| 54 | + </transition> | ||
| 55 | + </Card> | ||
| 56 | + <Modal v-model="showDonate" width="400"> | ||
| 55 | 57 | ||
| 56 | - <Tabs value="wechat"> | ||
| 58 | + <Tabs value="wechat"> | ||
| 57 | 59 | ||
| 58 | - <Tab-Pane :label="$t('table.wechat')" name="wechat"> | ||
| 59 | - <div style="text-align: center;"> | ||
| 60 | - <img width="200px" src="https://ww1.sinaimg.cn/large/7de3675bly1fizyy2pivwj2074074js6.jpg"> | ||
| 61 | - </div> | ||
| 62 | - </Tab-Pane> | ||
| 60 | + <Tab-Pane :label="$t('table.wechat')" name="wechat"> | ||
| 61 | + <div style="text-align: center;"> | ||
| 62 | + <img width="200px" src="https://ww1.sinaimg.cn/large/7de3675bly1fizyy2pivwj2074074js6.jpg"> | ||
| 63 | + </div> | ||
| 64 | + </Tab-Pane> | ||
| 63 | 65 | ||
| 64 | - <Tab-Pane :label="$t('table.alipay')" name="alipay"> | ||
| 65 | - <div style="text-align: center;"> | ||
| 66 | - <img width="200px" src="https://ww1.sinaimg.cn/large/7de3675bly1fizyyh7m7yj20ci0ciwfl.jpg"> | ||
| 67 | - </div> | ||
| 68 | - </Tab-Pane> | ||
| 66 | + <Tab-Pane :label="$t('table.alipay')" name="alipay"> | ||
| 67 | + <div style="text-align: center;"> | ||
| 68 | + <img width="200px" src="https://ww1.sinaimg.cn/large/7de3675bly1fizyyh7m7yj20ci0ciwfl.jpg"> | ||
| 69 | + </div> | ||
| 70 | + </Tab-Pane> | ||
| 69 | 71 | ||
| 70 | - <Tab-Pane :label="$t('table.paypal')" name="paypal"> | ||
| 71 | - <div style="text-align: center;"> | ||
| 72 | - <a href="https://paypal.me/jaepay/10" target="_blank"> | ||
| 73 | - <img src="https://ww1.sinaimg.cn/large/7de3675bly1fizzsw92owj207s03s748.jpg"> | ||
| 74 | - </a> | ||
| 75 | - </div> | ||
| 76 | - </Tab-Pane> | ||
| 72 | + <Tab-Pane :label="$t('table.paypal')" name="paypal"> | ||
| 73 | + <div style="text-align: center;"> | ||
| 74 | + <a href="https://paypal.me/jaepay/10" target="_blank"> | ||
| 75 | + <img src="https://ww1.sinaimg.cn/large/7de3675bly1fizzsw92owj207s03s748.jpg"> | ||
| 76 | + </a> | ||
| 77 | + </div> | ||
| 78 | + </Tab-Pane> | ||
| 77 | 79 | ||
| 78 | - </Tabs> | ||
| 80 | + </Tabs> | ||
| 79 | 81 | ||
| 80 | - <div slot="footer"> | ||
| 81 | - <Button type="info" size="large" long @click="showDonate=false">{{$t('table.closeDonate')}}</Button> | ||
| 82 | - </div> | ||
| 82 | + <div slot="footer"> | ||
| 83 | + <Button type="info" size="large" long @click="showDonate=false">{{$t('table.closeDonate')}}</Button> | ||
| 84 | + </div> | ||
| 85 | + | ||
| 86 | + </Modal> | ||
| 87 | + </div> | ||
| 88 | + </transition> | ||
| 89 | + | ||
| 90 | + <div v-show="!showTitle" @mouseover='showTitle = true'> | ||
| 91 | + | ||
| 92 | + <Indicator :count="count"></Indicator> | ||
| 83 | 93 | ||
| 84 | - </Modal> | ||
| 94 | + </div> | ||
| 85 | 95 | </div> | |
| 96 | + | ||
| 97 | + | ||
| 86 | 98 | </template> | |
| 87 | 99 | ||
| 88 | 100 | <script> | |
| 89 | 101 | /* global Event */ | |
| 90 | 102 | import Tools from '../common/js/tools' | |
| 91 | 103 | import Info from './Info.vue' | |
| 104 | + import Indicator from './Indicator.vue' | ||
| 92 | 105 | export default { | |
| 93 | - components: { Info }, | ||
| 106 | + components: { Info,Indicator }, | ||
| 94 | 107 | mounted: function () { | |
| 95 | 108 | // let host = location.host.split('.').splice(-2).join('.'); | |
| 96 | 109 | /* let host = 'baidu.com' | |
@@ -104,6 +117,7 @@ | |||
| 104 | 117 | }, | |
| 105 | 118 | data: function () { | |
| 106 | 119 | return { | |
| 120 | + showTitle:false, | ||
| 107 | 121 | showBody: false, | |
| 108 | 122 | titleIcon: 'chevron-up', | |
| 109 | 123 | count: 0, | |
@@ -229,7 +243,11 @@ | |||
| 229 | 243 | Tools.dispatchEvent('close') | |
| 230 | 244 | }, | |
| 231 | 245 | bodySwitch () { | |
| 232 | - this.showBody = !this.showBody | ||
| 246 | + this.showBody = !this.showBody | ||
| 247 | + setTimeout(()=>{ | ||
| 248 | + this.showTitle = this.showBody | ||
| 249 | + },500) | ||
| 250 | + | ||
| 233 | 251 | }, | |
| 234 | 252 | open (url) { | |
| 235 | 253 | window.open(url) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments