File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11// ==UserScript==
22// @name Github 增强 - 高速下载
3- // @version 1.5.1
3+ // @version 1.5.2
44// @author X.I.U
55// @description 高速下载 Git Clone/SSH、Release、Raw、Code(ZIP) 等文件、项目列表单文件快捷下载 (☁)
66// @match *://github.com/*
123123 // Release
124124 function addRelease ( ) {
125125 let html = document . getElementsByClassName ( 'Box Box--condensed' ) ; if ( ! html ) return
126+ let divDisplay ;
127+ if ( document . documentElement . clientWidth > 1000 ) {
128+ divDisplay = 'display: flex;' ;
129+ } else {
130+ divDisplay = 'display: block;' ;
131+ }
126132 Array . from ( html ) . forEach ( function ( current ) {
127133 current . querySelectorAll ( '.d-flex.Box-body > a' ) . forEach ( function ( _this ) {
128134 let href = _this . href . split ( 'github.com' ) ,
129135 url = [ ] ,
130- _html = `<div style="display: flex; justify-content: flex-end;">` ;
136+ _html = `<div style="${ divDisplay } justify-content: flex-end;">` ;
131137
132138 for ( let i = 0 ; i < download_url . length ; i ++ ) {
133139 if ( download_url [ i ] [ 0 ] === 'https://download.fastgit.org' ) {
151157 current . querySelectorAll ( '.d-block.Box-body > a' ) . forEach ( function ( _this ) {
152158 let href = _this . href . split ( 'github.com' ) ,
153159 url = [ ] ,
154- _html = `<div style="display: flex; justify-content: flex-end;flex-grow: 1;">` ;
160+ _html = `<div style="${ divDisplay } justify-content: flex-end;flex-grow: 1;">` ;
155161
156162 for ( let i = 0 ; i < download_url . length ; i ++ ) {
157163 if ( download_url [ i ] [ 0 ] === 'https://download.fastgit.org' ) {
You can’t perform that action at this time.
0 commit comments