AnandTech Forums Jump

Add a Read link to the Ask The Community block, to jump to each forum.

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         AnandTech Forums Jump
// @namespace    https://sites.google.com/site/kenscode/
// @version      0.1
// @description  Add a Read link to the Ask The Community block, to jump to each forum.
// @author       Ken g6 (Ken Brazier)
// @match        https://forums.anandtech.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    function changeReadLink() {
        var readlink = document.getElementById('askblockreadlink');
        var bselect = document.querySelector("form[data-xf-init*='future-quick-thread-widget draft'] select");
        var h = bselect.options[bselect.selectedIndex].dataset.actionUrl;
        h = h.substr(0, h.lastIndexOf('/')) + '/';
        readlink.href = h;
    }
    var bform = document.querySelector("form[data-xf-init*='future-quick-thread-widget draft']");
    if(bform != null) {
        var bselect = bform.querySelector("select");
        var bbgroup = bform.querySelector(".formButtonGroup");
        var readlink = document.createElement('a');
        readlink.innerHTML = '<span class="button-text">Read</span>';
        readlink.href = '#';
        readlink.className = 'button--primary button button--icon button--icon--search rippleButton';
        readlink.id = 'askblockreadlink';
        bbgroup.insertBefore(readlink, bbgroup.firstChild);
        changeReadLink();
        bselect.addEventListener("change", changeReadLink);
    }
})();