Advertisement
jamescolin

Buildnroll continue

Dec 25th, 2022
912
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2. window.addEventListener('load', function () {
  3. console.log('start');
  4. localStorage.jamesoptedin = 'yes';
  5.  
  6. if (localStorage.jamesdestination) {
  7. let destination = 'https://office.builderall.com/us/franchise/share/545219?p1=rd&p2='+encodeURIComponent(localStorage.jamesdestination);
  8. let el = document.querySelector('[data-tag="mybutton"] > div.desktop-element > a');
  9. let elb = document.querySelector('[data-tag="mybutton"] > div.mobile-element > a');
  10. el.href = destination;
  11. elb.href = destination;
  12. }
  13.  
  14. startParticules();
  15. });
  16.  
  17. function startParticules() {
  18. if (typeof particlesJS != 'function') {
  19.  setTimeout(startParticules, 5000);
  20. return null;
  21. } else {
  22. let element = document.createElement('div');
  23. element.setAttribute("id", "jamesparticules");
  24. element.style.cssText = 'position:fixed;top:0;left:0;width:100%;height:100%;z-index:999;pointer-events:none;';
  25. document.getElementById('app').prepend(element);
  26. particlesJS("jamesparticules", {
  27.   "particles": {
  28.     "number": {
  29.       "value": 80,
  30.       "density": {
  31.         "enable": true,
  32.         "value_area": 800
  33.       }
  34.     },
  35.     "color": {
  36.       "value": "#f2fafd"
  37.     },
  38.     "shape": {
  39.       "type": "circle",
  40.       "stroke": {
  41.         "width": 0,
  42.         "color": "#000000"
  43.       },
  44.       "polygon": {
  45.         "nb_sides": 5
  46.       },
  47.       "image": {
  48.         "src": "img/github.svg",
  49.         "width": 100,
  50.         "height": 100
  51.       }
  52.     },
  53.     "opacity": {
  54.       "value": 0.5,
  55.       "random": true,
  56.       "anim": {
  57.         "enable": true,
  58.         "speed": 0.5,
  59.         "opacity_min": 0.1,
  60.         "sync": false
  61.       }
  62.     },
  63.     "size": {
  64.       "value": 3,
  65.       "random": true,
  66.       "anim": {
  67.         "enable": false,
  68.         "speed": 30,
  69.         "size_min": 0.1,
  70.         "sync": false
  71.       }
  72.     },
  73.     "line_linked": {
  74.       "enable": true,
  75.       "distance": 150,
  76.       "color": "#f2fafd",
  77.       "opacity": 0.4,
  78.       "width": 1
  79.     },
  80.     "move": {
  81.       "enable": true,
  82.       "speed": 3,
  83.       "direction": "none",
  84.       "random": true,
  85.       "straight": false,
  86.       "out_mode": "out",
  87.       "bounce": false,
  88.       "attract": {
  89.         "enable": false,
  90.         "rotateX": 600,
  91.         "rotateY": 1200
  92.       }
  93.     }
  94.   },
  95.   "interactivity": {
  96.     "detect_on": "window",
  97.     "events": {
  98.       "onhover": {
  99.         "enable": true,
  100.         "mode": "grab"
  101.       },
  102.       "onclick": {
  103.         "enable": true,
  104.         "mode": "bubble"
  105.       },
  106.       "resize": true
  107.     },
  108.     "modes": {
  109.       "grab": {
  110.         "distance": 299.7002997002997,
  111.         "line_linked": {
  112.           "opacity": 0.6638009892253769
  113.         }
  114.       },
  115.       "bubble": {
  116.         "distance": 299.7002997002997,
  117.         "size": 15.984015984015985,
  118.         "duration": 2,
  119.         "opacity": 0.46353646353646355,
  120.         "speed": 2
  121.       },
  122.       "repulse": {
  123.         "distance": 200,
  124.         "duration": 0.4
  125.       },
  126.       "push": {
  127.         "particles_nb": 4
  128.       },
  129.       "remove": {
  130.         "particles_nb": 2
  131.       }
  132.     }
  133.   },
  134.   "retina_detect": true
  135. });
  136. }
  137. }
  138. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement