Fuck QQ URL

Skip Unsafe Link Warning in Desktop QQ Client

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name        Fuck QQ URL
// @namespace   Hill98
// @description Skip Unsafe Link Warning in Desktop QQ Client
// @version     1.2.2
// @author      Hill-98
// @license     MIT
// @icon        https://qzonestyle.gtimg.cn/qzone/qzact/act/external/tiqq/logo.png
// @homepageURL https://github.com/Hill-98/userscripts
// @supportURL  https://github.com/Hill-98/userscripts/issues
// @grant       none
// @match       https://c.pc.qq.com/ios.html?*
// @match       https://c.pc.qq.com/middlem.html?*
// @match       https://c.pc.qq.com/pc.html?*
// ==/UserScript==

const usp = new URLSearchParams(location.search);
let url = usp.get('pfurl') || usp.get('url');
if (url !== null) {
  url = url.match(/^https?:\/\//) === null ? `http://${url}` : url;
  const meta = document.createElement('meta');
  meta.content = `0; url='${url}'`;
  meta.httpEquiv = 'refresh';
  document.head.innerHTML = meta.outerHTML;
  const tips = document.createElement('p');
  tips.style.fontSize = '2rem';
  tips.textContent = 'If there is no jump. ';
  const tipsLink = document.createElement('a');
  tipsLink.href = url;
  tipsLink.textContent = 'click here';
  tips.append(tipsLink);
  document.body.innerHTML = tips.outerHTML;
}