memchr

joined 2 years ago
[–] memchr 5 points 2 years ago* (last edited 2 years ago) (5 children)

try this script

// ==UserScript==
// @name        reddit archive link
// @include     *://*.google*/search*
// @include     *://*.reddit.com/r/*
// @grant       none
// @version     1.0
// @author      memchr
// @description 6/15/2023, 6:57:32 AM
// ==/UserScript==
function get_archive_href(href) {
  return href.replace(/https:\/\/www\.reddit/,"https://web.archive.org/web/https://old.reddit");
}

if (window.location.hostname.match(/^(\w*\.)?google.*$/)) { // google
  const results = document.querySelectorAll('div.yuRUbf > a');
  results.forEach(e => {
    let href = e.getAttribute('href');
    if (href.match(/reddit\.com\/r\//)) {
      href = get_archive_href(href);
      let archive_link = document.createElement('a');
      archive_link.href = href;
      archive_link.textContent = "archive";
      archive_link.style.marginLeft = "10px";
      e.insertAdjacentElement("afterend", archive_link);
    }
  })
} else if (window.location.hostname.match(/^(\w*\.)?redd.*$/)) { // reddit shit
  const href = get_archive_href(location.href);

  const button = document.createElement('button');
  button.textContent = 'archive';
  button.style.position = 'fixed';
  button.style.bottom = '20px';
  button.style.left = '20px';
  button.style.backgroundColor = '#655CF2ff';
  button.style.color = 'white';
  button.style.zIndex = '9999';
  button.style.borderRadius = '20px';
  button.style.padding = '5px';
  document.body.appendChild(button);

  button.addEventListener('click', () => {location.replace(href)});
}

It will add a link to archive.org next to the reddit Google search result, or a blue link to archive button in the bottom left corner of a reddit page.

Script manager such as violentmonkey is required.

[–] memchr 5 points 2 years ago (1 children)

You can use appending https://web.archive.org/web/ to the said reddit URL (use old.reddit.com) as a workaround. The archive team has been archiving a lot of reddit content lately.

[–] memchr 1 points 2 years ago (1 children)

You are welcome.

However, I suspect it's possibly a system corruption. So check your memory and hard drive to make sure they are OK before using your PC again.

And consider using btrfs, you can take snapshots before updating packages and restore them in case of package corruption.

[–] memchr 1 points 2 years ago

There is also a possibility of system corruption. Can you post the output of this command as well?

_tmp=$(mktemp) && pacman -Qkk 2>&1 | grep -v '0 altered' > $_tmp && less < $_tmp
[–] memchr 1 points 2 years ago (4 children)

ip a shows no interface except lo.

what is the output of lspci -v -s 05:00.0 and lspci -v -s 06:00.0?

[–] memchr 1 points 2 years ago (8 children)

Sure thing, mind you post some specs like output of ip a, and ip route show? And what network manager do you use?

[–] memchr 6 points 2 years ago

digg déjà vu

view more: ‹ prev next ›