🎉 欢迎访问GreasyFork.Org 镜像站!本镜像站由公众号【爱吃馍】搭建,用于分享脚本。联系邮箱📮

Greasy fork 爱吃馍镜像

Android AppLinks Rewriter

Re-writes Android App Links to point to "a better place"

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

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.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

🚀 安装遇到问题?关注公众号获取帮助

公众号二维码

扫码关注【爱吃馍】

回复【脚本】获取最新教程和防失联地址

// ==UserScript==
// @id             aal-rw
// @name           Android AppLinks Rewriter
// @version        1.5.0
// @namespace      http://projects.izzysoft.de/
// @author         IzzySoft
// @homepage       https://codeberg.org/izzy/userscripts
// @description    Re-writes Android App Links to point to "a better place"
// @license        CC BY-NC-SA
// @include        *
// @exclude        http://*.appbrain.com/*
// @exclude        https://*.appbrain.com/*
// @exclude        https://play.google.com/*
// @exclude        https://android.izzysoft.de/*
// @run-at         document-idle
// @grant          unsafeWindow
// ==/UserScript==

var playstore = 'https://play.google.com/store/apps/details?id=';
var appbrain  = 'https://www.appbrain.com/app/';
var appbrain_search = 'https://www.appbrain.com/search?q=';

for(var i = 0; i < document.links.length; i++) {
  var elem = document.links[i];
  // Links to Google Play
  if (elem.href.match(/play.google.com\/store\/apps\/details\?id=([^&#]+)/i)) {
    elem.href=appbrain+RegExp.$1;
  }
  else if (elem.href.match(/play.google.com\/store\/search\?q=([^&#]+)/i)) {
    elem.href=appbrain_search+RegExp.$1;
  }
  else if (elem.href.match(/market.android.com\/details\?id=([^&#]+)/i)) {
    elem.href=appbrain+RegExp.$1;
  }

  // Camouflaged links (Appoid)
  if (elem.href.match(/\/out\/\?\S*play\.google\.com%2Fstore%2Fapps%2Fdetails%3Fid%3D([^&#]+)/i)) { // old redirects
    elem.href=appbrain+RegExp.$1
  }
  else if (elem.href.match(/\/redirect\/\S+\?partner=\S*&id=([^&#]+)/i)) { // newer redirects as of 4/2017
    elem.href=appbrain+RegExp.$1
  }

  // androidapptests.com moved to n-droid.de
  if (elem.href.match(/www.androidapptests.com\/(.*)/i)) {
    elem.href='https://www.n-droid.de/'+RegExp.$1;
  }
}