check if ad enabled
This commit is contained in:
4
go.mod
4
go.mod
@@ -10,13 +10,13 @@ replace (
|
|||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
fornaxian.com/pixeldrain-api v0.0.0-20200224165550-54483c862cd0
|
fornaxian.com/pixeldrain-api v0.0.0-20200607143707-5b697aff6c1e
|
||||||
github.com/Fornaxian/config v0.0.0-20180915150834-ac41cf746a70
|
github.com/Fornaxian/config v0.0.0-20180915150834-ac41cf746a70
|
||||||
github.com/Fornaxian/log v0.0.0-20190617093801-1c7ce9a7c9b3
|
github.com/Fornaxian/log v0.0.0-20190617093801-1c7ce9a7c9b3
|
||||||
github.com/Fornaxian/pd_mime_type v0.0.0-20200204165508-2815edf3a145
|
github.com/Fornaxian/pd_mime_type v0.0.0-20200204165508-2815edf3a145
|
||||||
github.com/google/uuid v1.1.1
|
github.com/google/uuid v1.1.1
|
||||||
github.com/julienschmidt/httprouter v1.3.0
|
github.com/julienschmidt/httprouter v1.3.0
|
||||||
github.com/microcosm-cc/bluemonday v1.0.2
|
github.com/microcosm-cc/bluemonday v1.0.2
|
||||||
|
github.com/russross/blackfriday/v2 v2.0.1
|
||||||
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
|
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
|
||||||
gopkg.in/russross/blackfriday.v2 v2.0.0
|
|
||||||
)
|
)
|
||||||
|
5
go.sum
5
go.sum
@@ -47,7 +47,12 @@ github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/9
|
|||||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||||
github.com/robfig/cron v1.2.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k=
|
github.com/robfig/cron v1.2.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k=
|
||||||
|
github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo=
|
||||||
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
|
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
|
||||||
|
github.com/russross/blackfriday v2.0.0+incompatible h1:cBXrhZNUf9C+La9/YpS+UHpUT8YD6Td9ZMSU9APFcsk=
|
||||||
|
github.com/russross/blackfriday v2.0.0+incompatible/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
|
||||||
|
github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=
|
||||||
|
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||||
github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
|
github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
|
||||||
github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=
|
github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=
|
||||||
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
||||||
|
@@ -133,6 +133,9 @@ Viewer.prototype.setFile = function(file) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Viewer.prototype.renderSponsors = function() {
|
Viewer.prototype.renderSponsors = function() {
|
||||||
|
// Check if the ad is enabled
|
||||||
|
if (document.querySelector(".sponsors_banner") == null) { return }
|
||||||
|
|
||||||
let scaleWidth = 1
|
let scaleWidth = 1
|
||||||
let scaleHeight = 1
|
let scaleHeight = 1
|
||||||
let minWindowHeight = 800
|
let minWindowHeight = 800
|
||||||
|
@@ -11,7 +11,7 @@ import (
|
|||||||
"github.com/Fornaxian/log"
|
"github.com/Fornaxian/log"
|
||||||
"github.com/julienschmidt/httprouter"
|
"github.com/julienschmidt/httprouter"
|
||||||
"github.com/microcosm-cc/bluemonday"
|
"github.com/microcosm-cc/bluemonday"
|
||||||
"gopkg.in/russross/blackfriday.v2"
|
blackfriday "github.com/russross/blackfriday/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ServeFilePreview controller for GET /u/:id/preview
|
// ServeFilePreview controller for GET /u/:id/preview
|
||||||
|
Reference in New Issue
Block a user