Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
admin:online-platform-cms:3rd-party-scripts:content-hidder-script [2022/11/21 10:36] – ringaudas-vainius | admin:online-platform-cms:3rd-party-scripts:content-hidder-script [2022/11/23 08:06] – ignas-bogusis | ||
---|---|---|---|
Line 9: | Line 9: | ||
< | < | ||
Here you can add specific website parts to be hidden. Class / ID has to be unique, otherwise it will hide all content that match written class/ | Here you can add specific website parts to be hidden. Class / ID has to be unique, otherwise it will hide all content that match written class/ | ||
+ | </ | ||
+ | **REDIRECT_TO_MAIN_PAGE_AFTER_REGISTRATION** | ||
+ | < | ||
+ | Set this to " | ||
</ | </ | ||
**HIDDEN_GAMES** | **HIDDEN_GAMES** | ||
< | < | ||
Here you can add games that you want to be hidden in header. If you pass `' | Here you can add games that you want to be hidden in header. If you pass `' | ||
- | |||
</ | </ | ||
Line 31: | Line 34: | ||
- roulette-live | - roulette-live | ||
- dogs | - dogs | ||
+ | - betgames-rng-wheel | ||
- undefined (hides every expandable header menu) | - undefined (hides every expandable header menu) | ||
Line 36: | Line 40: | ||
=== HIDDER SCRIPT === | === HIDDER SCRIPT === | ||
< | < | ||
- | const SUB_DOMAIN = ''; | + | const SUB_DOMAIN = 'example'; |
+ | const REDIRECT_TO_MAIN_PAGE_AFTER_REGISTRATION = true; | ||
const HIDDEN_CONTENT = [ | const HIDDEN_CONTENT = [ | ||
- | ' | + | ' |
- | ' | + | |
- | ' | + | |
- | '# | + | |
- | ' | + | |
]; | ]; | ||
const HIDDEN_GAMES = [ | const HIDDEN_GAMES = [ | ||
Line 52: | Line 53: | ||
' | ' | ||
' | ' | ||
- | ' | + | ' |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | | + | |
] | ] | ||
Line 93: | Line 88: | ||
} | } | ||
- | function | + | function |
const host = window.location.host; | const host = window.location.host; | ||
- | | + | |
+ | } | ||
+ | |||
+ | function redirectToMainPage() { | ||
+ | const host = window.location.origin; | ||
+ | const newURL = host.replace(SUB_DOMAIN + ' | ||
+ | window.location.assign(newURL); | ||
+ | } | ||
+ | |||
+ | function startHider() { | ||
+ | const parsedSubDomain = getParsedSubDomain(); | ||
if (parsedSubDomain !== SUB_DOMAIN) return; | if (parsedSubDomain !== SUB_DOMAIN) return; | ||
+ | console.log(' | ||
addMeta(); | addMeta(); | ||
hidePageContent(); | hidePageContent(); | ||
Line 103: | Line 109: | ||
document.addEventListener(' | document.addEventListener(' | ||
document.addEventListener(' | document.addEventListener(' | ||
+ | if (REDIRECT_TO_MAIN_PAGE_AFTER_REGISTRATION) { | ||
+ | document.body.addEventListener(' | ||
+ | } | ||
} | } | ||
startHider(); | startHider(); | ||
</ | </ |