Android Developer Console

Adds some links helpful to developers in the Android Market

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

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

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name          Android Developer Console
// @description   Adds some links helpful to developers in the Android Market
// @include       https://play.google.com/*
// @match         https://play.google.com/*
// @version       5.1
// @author        Afzal Najam
// @changelog     Modified for new Play Store
// @require       http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js
// @grant         GM_setValue
// @grant         GM_getValue
// @grant         GM_listValues
// @grant         GM_deleteValue
// @grant         GM_log
// @namespace https://greasyfork.org/users/4370
// ==/UserScript==

myOrders = $('li[jsinstance ^="0"]');
if (myOrders) {
    listitem = document.createElement('div');
    listitem.className = 'leaf-submenu-link-wrapper';
    devlink = document.createElement('a');
    devlink.className = 'leaf-submenu-link';
    devlink.setAttribute('href', 'https://play.google.com/apps/publish/');
    devlink.setAttribute('target', '_blank');
    devlink.innerHTML = 'My developer console';

    listitem.appendChild(devlink);
    myOrders.after(listitem);
}

if (window.location.hash.indexOf("AppListPlace") > 0) {
    archiveItems();
}

function archiveItems() {
    updateP = $("p[data-column*='UPDATE']");

    if (updateP) {
        var archiveLink = $('<a>', {
            href: "#test",
            style: "background: no-repeat url(//ssl.gstatic.com/mail/sprites/general_black-16bf964ab5b51c4b7462e4429bfa7fe8.png) 0 -17px; width: 25px; height: 25px; display: inline-block; vertical-align: -50%;",
            onclick: "GM_setValue('hiddenApps', 'testing')",
        });
        updateP.prepend(archiveLink);
    } else {
        console.log("updateP not found");
    }
    var vals = [];
    var values = GM_listValues();
    for (var i = 0; i < values.length; i++) {
        vals.push(GM_getValue(GM_listValues()[i]));
    }
    GM_log(vals);
}

function resetArchived() {
    GM_deleteValue("hiddenApps");
}

function setArchived(appName) {
    GM_setValue("hiddenApps", appName);
}

function showStoreLink() {
    pubButton = $("button>*:contains('Published')");
    if (pubButton.length > 0) {
        appName = window.location.hash.split("=")[1];
        element = pubButton.parent().parent().parent().next().next();
        link = "https://play.google.com/store/apps/details?id=" + appName;
        element.html("- ");
        $('<a>', {
            text: appName,
            href: link,
        }).appendTo(element);
    }
}

function locationHashChanged() {
    locationHash = window.location.hash;
    if (locationHash.indexOf("AppListPlace") > 0) {
        console.log("archive icons");
        archiveItems();
    } else if (locationHash.indexOf(":p=") > 0) {
        showStoreLink();
    }
}

window.addEventListener("hashchange", locationHashChanged);