PageSourceSearch

https://mirror.anadius.cc/common.js

js anadius.cc collected 2026-10-08 10:22:44 UTC 3,529 bytes, 102 lines download raw bytes

1const setAttributes = (el, attrs) => {
2  Object.keys(attrs).forEach(key => el.setAttribute(key, attrs[key]));
3};
4
5window.addJS = (url, integrity) => new Promise((resolve, reject) => {
6  const js = document.createElement('script');
7  js.onload = resolve;
8  js.onerror = reject;
9  let attributes = {src: url};
10  if(typeof integrity != 'undefined')
11    Object.assign(attributes, {integrity: integrity, crossorigin: 'anonymous'});
12  setAttributes(js, attributes);
13  document.body.appendChild(js);
14});
15
16(() => {
17  const path = (new URL(canonical)).pathname;
18  let link = document.querySelector(`a.nav-link[href="${path}"]`);
19  if(link !== null) {
20    link.classList.add('active');
21  }
22  else {
23    link = document.querySelector(`a.dropdown-item[href="${path}"]`);
24    if(link !== null) {
25      link.classList.add('active');
26      link.parentElement.previousElementSibling.classList.add('active');
27    }
28  }
29})();
30
31// (() => {
32//   const warning = document.createElement("div");
33//   warning.classList.add("alert");
34//   warning.classList.add("alert-danger");
35//   warning.classList.add("text-center");
36//   warning.innerHTML = "I may lose access to this domain in the coming months. If that happens I'll replace the link in Sims 4 Updater and in my Twitter bio (@anadius) with a new domain.";
37//   document.querySelector(".container").before(warning);
38// })();
39
40(() => {
41  const info = document.createElement("div");
42  info.classList.add("alert");
43  info.classList.add("alert-info");
44  info.classList.add("text-center");
45  info.innerHTML = "anadius site mirror (with updates) | <a href=\"https://cs.rin.ru/forum/viewtopic.php?t=153833\" target=\"_blank\">CS RIN thread</a><br>works on win<br>linux works with wine<br>mac should work wine";
46  document.querySelector(".container").before(info);
47})();
48
49
50(function loadGtag() {
51  const MEASUREMENT_ID = "G-JFMS2WYG9B";
52
53  if (window.gtag || (window.dataLayer && window.dataLayer.__gtagLoaded)) return;
54
55  window.dataLayer = window.dataLayer || [];
56  window.dataLayer.__gtagLoaded = true;
57
58  function gtag(){ window.dataLayer.push(arguments); }
59  window.gtag = window.gtag || gtag;
60
61  window.gtag("js", new Date());
62
63  const s = document.createElement("script");
64  s.async = true;
65  s.src = "https://www.googletagmanager.com/gtag/js?id=" + encodeURIComponent(MEASUREMENT_ID);
66  document.head.appendChild(s);
67
68  window.gtag("config", MEASUREMENT_ID);
69})();
70
71
72
73(() => {
74  const dsq = document.querySelector('#disqus_thread');
75  if(dsq == null)
76    return;
77
78  const div = document.createElement('div');
79  div.innerHTML = '<div class="card-body"><h3>Install <a href="https://ublockorigin.com/" target="_blank">uBlock Origin</a> browser extension and get rid of the ads on the internet!</h3><br><br><br></div>';
80  div.id = 'banner-advert-container';
81  div.setAttribute('class', 'addthis_toolbox');
82  dsq.parentElement.prepend(div);
83  /*new MutationObserver(function(mutations, observer) {
84    mutations.forEach(function(mutation) {
85      mutation.addedNodes.forEach(function(node) {
86        if(node.nodeName.toUpperCase() == 'IFRAME') {
87          if(!node.getAttribute('name').startsWith('dsq-'))
88            return;
89          const src = node.getAttribute('src') || '';
90          if(src.includes('/comments/'))
91            return;
92
93          node.setAttribute('sandbox', '');
94          node.style.height = '0px !important';
95          node.setAttribute('src', 'data:text/html;base64,');
96
97          observer.disconnect()
98        }
99      });
100    });
101  }).observe(dsq, {childList: true});*/
102})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.