admin:online-platform-cms:3rd-party-scripts:content-hidder-script

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
admin:online-platform-cms:3rd-party-scripts:content-hidder-script [2022/11/23 08:06] ignas-bogusisadmin:online-platform-cms:3rd-party-scripts:content-hidder-script [2023/04/12 12:14] (current) ignas-bogusis
Line 13: Line 13:
 <code> <code>
 Set this to "true" if you want that after complete registration user will be redirected to your main page and hider script disabled. There is one downside with it - after redirect user will have to re-login to his account. Set this to "true" if you want that after complete registration user will be redirected to your main page and hider script disabled. There is one downside with it - after redirect user will have to re-login to his account.
 +</code>
 +**REDIRECT_TO_MAIN_PAGE_AFTER_LOGIN**
 +<code>
 +Set this to "true" if you want that after login user will be redirected to your main page and hider script disabled. There is one downside with it - after redirect user will have to re-login to his account.
 </code> </code>
 **HIDDEN_GAMES** **HIDDEN_GAMES**
Line 40: Line 44:
 === HIDDER SCRIPT === === HIDDER SCRIPT ===
 <code> <code>
-const SUB_DOMAIN = 'example';+const SUB_DOMAIN = '';
 const REDIRECT_TO_MAIN_PAGE_AFTER_REGISTRATION = true; const REDIRECT_TO_MAIN_PAGE_AFTER_REGISTRATION = true;
 +const REDIRECT_TO_MAIN_PAGE_AFTER_LOGIN = true;
 const HIDDEN_CONTENT = [ const HIDDEN_CONTENT = [
- '.hider'+  '.banner-row.center', 
 +  '.banner-row.right', 
 +  '.header-cms-links-row', 
 +  '#cms-footer-content-holder', 
 +  '.left-menu.side-menu-toggle-wrapper'
 ]; ];
 const HIDDEN_GAMES = [ const HIDDEN_GAMES = [
Line 53: Line 62:
   'betgames-iframe',   'betgames-iframe',
   'greyhounds',   'greyhounds',
-  'undefined' +  'undefined', 
-]+  'pragmatic', 
 +  'agtslots', 
 +  'roulette-live', 
 +  'dogs', 
 +  'evolution', 
 +  'betgames-rng-wheel
 +];
  
 const getElement = async selector => { const getElement = async selector => {
Line 103: Line 118:
   if (parsedSubDomain !== SUB_DOMAIN) return;   if (parsedSubDomain !== SUB_DOMAIN) return;
  
-  console.log('Hidder enabled'); 
   addMeta();   addMeta();
   hidePageContent();   hidePageContent();
Line 111: Line 125:
   if (REDIRECT_TO_MAIN_PAGE_AFTER_REGISTRATION) {   if (REDIRECT_TO_MAIN_PAGE_AFTER_REGISTRATION) {
     document.body.addEventListener('userRegisterComplete', redirectToMainPage);     document.body.addEventListener('userRegisterComplete', redirectToMainPage);
 +  }
 +  if (REDIRECT_TO_MAIN_PAGE_AFTER_LOGIN) {
 +    document.body.addEventListener('userLogIn', redirectToMainPage);
   }   }
 } }
  • admin/online-platform-cms/3rd-party-scripts/content-hidder-script.1669190778.txt.gz
  • Last modified: 2022/11/23 08:06
  • by ignas-bogusis