From 9c12ed3b6edb4d087db79fbc8482c9211021602d Mon Sep 17 00:00:00 2001 From: Unknwon Date: Sat, 14 Nov 2015 04:54:27 -0500 Subject: [PATCH] clean up --- .gopmfile | 1 - modules/middleware/repo.go | 14 -------------- public/js/ZeroClipboard.swf | Bin 1071 -> 0 bytes 3 files changed, 15 deletions(-) delete mode 100644 public/js/ZeroClipboard.swf diff --git a/.gopmfile b/.gopmfile index 7625c9470..35a33b9da 100644 --- a/.gopmfile +++ b/.gopmfile @@ -26,7 +26,6 @@ github.com/lib/pq = commit:83c4f41 github.com/mattn/go-sqlite3 = commit:5651a9d github.com/mcuadros/go-version = commit:d52711f github.com/microcosm-cc/bluemonday = commit:4ac6f27 -github.com/mssola/user_agent = commit:783ec61 github.com/msteinert/pam = commit:6534f23b39 github.com/nfnt/resize = commit:dc93e1b98c github.com/russross/blackfriday = commit:510be64 diff --git a/modules/middleware/repo.go b/modules/middleware/repo.go index 1154907a1..141848643 100644 --- a/modules/middleware/repo.go +++ b/modules/middleware/repo.go @@ -10,8 +10,6 @@ import ( "path" "strings" - "github.com/mcuadros/go-version" - "github.com/mssola/user_agent" "gopkg.in/macaron.v1" "github.com/gogits/gogs/models" @@ -20,11 +18,6 @@ import ( "github.com/gogits/gogs/modules/setting" ) -const ( - FIREFOX_COPY_SUPPORT = "41.0" - CHROME_COPY_SUPPORT = "43.0.2356" -) - func ApiRepoAssignment() macaron.Handler { return func(ctx *Context) { userName := ctx.Params(":username") @@ -393,13 +386,6 @@ func RepoAssignment(redirect bool, args ...bool) macaron.Handler { ctx.Data["GoDocDirectory"] = prefix + "{/dir}" ctx.Data["GoDocFile"] = prefix + "{/dir}/{file}#L{line}" } - - userAgent := ctx.Req.Header.Get("User-Agent") - ua := user_agent.New(userAgent) - browserName, browserVer := ua.Browser() - - ctx.Data["BrowserSupportsCopy"] = (browserName == "Chrome" && version.Compare(browserVer, CHROME_COPY_SUPPORT, ">=")) || - (browserName == "Firefox" && version.Compare(browserVer, FIREFOX_COPY_SUPPORT, ">=")) } } diff --git a/public/js/ZeroClipboard.swf b/public/js/ZeroClipboard.swf deleted file mode 100644 index 13bf8e396202964e0048333d878f4b949a2f5e6a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1071 zcmV+~1kn3KS5pay1^@tfoPAa6Qrkup-d$aeB-A-xFjKf1te)pFM-&Q&_dOT zp~-XxqP4X~YJ}vGWC;KAD1C=MKwiO_PG6^Vbs@z~r#qgr-}!Xr?4IxJ9P1kT4dpSa zmlT9hja*+}e;Cbih*6`(JT|+I(1(#NIVSiTL~Dq=|Lb=d5tOYL`L;_#dyQQ%FAAmI zcth~a_gzLk@xphk!Y?fFYp&C2`ZTZ#X}INt9hY9ojZWZ1Om23g$oC2%i(XLAs&#|V z5ArS7X}yhomj%SJGT~|rnZj|zM|I&j59e1QKqGxQN5!(ijWrx1S)ZN!RwWBwC`$uYc z!)028S7F4?l?H2dd39HKImh$+mv#S~I-YjmQ;P-rUfUM~-;Xr+ldpAXK+hS!b|@Ro zUs)@fv!kf9RjpFXZ?d(Pe_q{bY*sgP{Ykaib==7Da_N!X$Z^AwK5e&BZ5R56j>T=;_5DD$nR8}GiWShym;5A&x*eM;)Us-}<67Eb+@9n>sdlhm z`(coON!$a6H-ML=9U8}t-8aV1yD!xY9v@|7-FWq*lEUMka&b=Hq$X{>72}4eNl_P+ zccPJWGtXb!r#GbVPIO$}sN%oME%Yf<`b@|2f6G5y#$}-l zAR|D=L6`ti0Wt|N4P*v{Ss-&j?gE(yvY_TMkQE@SK-Pd%f#~WwXExMLZXW@84CD#m zFMxar!IU~i}ZGSTvX;GX_!`A@yKkIbSu*e=l_b9m*BF@hOB8SS;p?XkU4 z+#Y{FagI+_hF#pQ*y^c#B7H9*TQ=n-IvJZOQ*KYMV&e{u!2((~XOiIAy*Zr0yBr$x zqA6D~T{u}ZWn+;Cn@jC`refSD34E}PZ{YGaxq%P2g&VlCEyl30qM2Z<#-M2CQxMno zG_4J8H7mc8(VenQzJ;=@j=BiTh*RubMeS$61ORcM^S6!u6l;=?s|@ py1A~K8@jovn~!u;;=k8uI$3rc`gC{*rT-s&a~N%N=5J58nk1s|4c7nw