Greasy Fork is available in English.

直接打开抖音分享地址

打开前面有字的抖音分享地址,直接跳转链接。

// ==UserScript==
// @name         直接打开抖音分享地址
// @namespace    http://domain.com/directory
// @version      0.1
// @description  打开前面有字的抖音分享地址,直接跳转链接。
// @author       幸福的赢得
// @run-at       document-start
// @match        *://cn.bing.com/search?*
// @grant        none
// ==/UserScript==

if (/v\.douyin\.com/.test(location.href)) {

    var plainPath =
    decodeURIComponent(location.href)

    plainPath = 
    plainPath.replace(/^.*?v\.douyin\.com\// , '');

    plainPath = 
    plainPath.replace(/\+.*/ , '');

    plainPath = 
    "https://v.douyin.com/" + plainPath

    location.replace(plainPath);

}