Android AppLinks Rewriter

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

Stan na 28-02-2017. Zobacz najnowsza wersja.

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

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

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==
// @id             aal-rw
// @name           Android AppLinks Rewriter
// @version        1.4.1
// @namespace      http://projects.izzysoft.de/
// @author         IzzySoft
// @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/';

for(var i = 0; i < document.links.length; i++) {
  var elem = document.links[i];
  // Links on AndroidPIT
  if (elem.href.match(/\/de\/android\/market\/apps\/app\/([^\/]+)\/([^\/]+)/i)) {
    //elem.href=playstore+RegExp.$1;
    elem.href=appbrain+RegExp.$2+'/'+RegExp.$1;
    //elem.href='//'+RegExp.$1; // just the package name
  }
  if (elem.href.match(/androidpit.(de|com)\/app\/([^\/]+)/i)) { // new URL structure
    elem.href=appbrain+RegExp.$2;
  }

  // Links to Google Play
  if (elem.href.match(/play.google.com\/store\/apps\/details\?id=([^&#]+)/i)) {
    elem.href=appbrain+RegExp.$1;
  }
  if (elem.href.match(/market.android.com\/details\?id=([^&#]+)/i)) {
    elem.href=appbrain+RegExp.$1;
  }

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