ccw_conifer

Show discord images - whitespace borked

Apr 21st, 2021
598
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. javascript:((boolLoadImages => {  const err = window.console.error;  const log = window.console.log;  const selectAll = x => Array.from(window.document.querySelectorAll(x));  const reverse = f => (...args) => f(...(args.reverse()));  selectAll('[aria-label="User Settings"]')[0].click();  selectAll('div [role="tab"]').find(x => x.innerText === 'Text & Images').click();  var attempts = 0;  inter = reverse(setInterval)(100, () => {    attempts += 1;    if (attempts > 10) { /* wait for 10 * 100 = 1 second */      err('taking too long; giving up now');      alert('failed! check console for details');      clearInterval(inter);      return;    }    var targ = selectAll("div").find(x => x.innerText === 'When posted as links to chat');    if (targ) {      log('found target 1');          clearInterval(inter);    } else {      log('did not find target, waiting');      return;    }    try {      var tog = targ.querySelector('input');      if (tog.checked !== boolLoadImages) {        log('clicking 1');        tog.click();      }      targ = selectAll('div').find(x => x.innerText === 'When uploaded directly to Discord');      log('found target 2');      tog = targ.querySelector('input');      if (tog.checked !== boolLoadImages) {        log('clicking 2');        tog.click();      }      selectAll('[aria-label="Close"]')[0].click();    } catch (e) {      alert('failed! check console for details');      throw e;    }  });})(true))
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×