Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script noab="true">
- // These two flags only get set to true here, perhaps they have some impact elsewhere, can't tell
- var noab = false;
- var organic = false;
- // Haven't been able to determine what this is because our test URL does not have "ls" in it
- let indexPage = window.location.hash.substr(1);
- console.log('hash', window.location)
- if (indexPage == 'ls') {
- window['ls'] = true;
- }
- var article_link = '/team/MTMwMC4w';
- var URL_FRAGMENTS = [
- 'pushState',
- 'location',
- 'indexOf',
- 'href',
- '?utm_source=google&utm_medium=organic',
- '/reader/',
- 'replaceState',
- 'random'
- ];
- console.log(URL_FRAGMENTS);
- // This runs some type of slot machine bit where it rotates the same
- // array values in a cycle for an arbitrary amount of times
- // looks like just filler confusing type code
- (function(SELF_CALL_URL_FRAGMENTS, INCREMENTED_NUMBER) {
- console.log('selfcall', SELF_CALL_URL_FRAGMENTS, INCREMENTED_NUMBER)
- var reference_iterator = 0;
- var URL_FRAGMENT_ROTATOR = function(INCREMENTED_NUMBER_ARG) {
- while (--INCREMENTED_NUMBER_ARG) {
- reference_iterator++;
- SELF_CALL_URL_FRAGMENTS['push'](SELF_CALL_URL_FRAGMENTS['shift']());
- console.log('SELF CALL ITERATE',`Ref Iter ${reference_iterator}`, SELF_CALL_URL_FRAGMENTS);
- }
- };
- URL_FRAGMENT_ROTATOR(++INCREMENTED_NUMBER);
- })(URL_FRAGMENTS, 382);
- // This uses the arbitrary number to then select just any single piece from URL_FRAGMENTS
- // They toss the numbers in hex to be extra covert but that's about it.
- // I converted all the hex values to int
- var SINGLE_URL_FRAGMENT_FETCHER = function(SEQUENCE_NUMBER, _0x7ec0eb) {
- // console.log('RANDO', SEQUENCE_NUMBER, _0x7ec0eb);
- SEQUENCE_NUMBER = SEQUENCE_NUMBER - 466;
- var SELECTED_FRAGMENT = URL_FRAGMENTS[SEQUENCE_NUMBER];
- // console.log('RANDO SEQ', SELECTED_FRAGMENT);
- return SELECTED_FRAGMENT;
- };
- // Goofy remap of a function to be CrAzY RaNDom
- var FRAG_FETCH = SINGLE_URL_FRAGMENT_FETCHER;
- // Map of converted hex values to url fragment
- /*
- * 466 - replaceState()
- * 467 - "random"
- * 468 - pushState()
- * 469 - location
- * 470 - indexOf
- * 471 - href
- * 472 - ?utm_source=google&utm_medium=organic
- * 473 - /reader/
- */
- // Rolls the dice, 90% chance to append utm_source google to the url, sets organic flag to true
- Math.random() * 100 < 90 && ((article_link += '?utm_source=google&utm_medium=organic'), (organic = true));
- console.log('article link', article_link);
- // capability testing
- history['pushState'] && history['replaceState'] &&
- // Multiple calls, runs replaceState to set article link
- // to /team/MTMwMC4w?utm_source=google&utm_medium=organic?utm_source=google&utm_medium=organic
- // Then checks if we're still in /reader/
- // Then sets "noab" to true, presumably no adblock?\
- // Not sure what allowedNumberOfEboundDynamicAdds means
- (history.replaceState({}, null, article_link),
- document['location']['href'].indexOf('reader') < 0 &&
- (noab = true, (allowedNumberOfEboundDynamicAdds = 0)));
- // probably a trigger for the rest of the page to set behavior
- window['reader'] = true;
- // remove self
- setTimeout(function() {
- let elNoab = document.querySelector('script[noab="true"]');
- // more random stuff, select parent then drop back down to the child
- elNoab.parentElement.removeChild(elNoab);
- }, 500);
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement