1
0
Fork 0
mirror of https://git.sr.ht/~cadence/bibliogram synced 2026-03-02 02:41:34 +00:00

Slightly improve blocked detection

This commit is contained in:
Cadence Ember 2020-05-20 03:54:22 +12:00
parent ca1c965021
commit 8c8808e1dc
No known key found for this signature in database
GPG key ID: 128B99B1B74A6412
3 changed files with 12 additions and 3 deletions

View file

@ -1,6 +1,6 @@
const constants = require("../../lib/constants")
const switcher = require("../../lib/utils/torswitcher")
const {fetchUser, getOrFetchShortcode, userRequestCache, history} = require("../../lib/collectors")
const {fetchUser, getOrFetchShortcode, userRequestCache, history, assistantSwitcher} = require("../../lib/collectors")
const {render, redirect, getStaticURL} = require("pinski/plugins")
const {pugCache} = require("../passthrough")
const {getSettings} = require("./utils/getsettings")
@ -17,7 +17,7 @@ module.exports = [
return render(200, "pug/home.pug", {
settings,
rssEnabled: constants.feeds.enabled,
allUnblocked: history.testNoneBlocked(),
allUnblocked: history.testNoneBlocked() || assistantSwitcher.displaySomeUnblocked(),
torAvailable: switcher.canUseTor(),
hasPrivacyPolicy: constants.has_privacy_policy
})