自動的に全文を読む Afpbb

try to take over the world!

À partir de 2018-10-23. Voir la dernière version.

// ==UserScript==
// @name         自動的に全文を読む Afpbb
// @namespace    https://greasyfork.org/ja/users/6866-ppppq
// @version      0.1.20181023
// @description  try to take over the world!
// @author       You
// @match        http://www.afpbb.com/articles/-/*
// @grant        none
// @run-at       document-start
// ==/UserScript==

(function() {
    'use strict';
    var loc = document.location;
    var url = new URL(loc.href);
    var search = url.search;
    var fullPageMarker = 'act=all';

    if (!search.includes(fullPageMarker)) {
        if (search.length === 0) {
            url.search = fullPageMarker;
        } else {
            url.search += `&${fullPageMarker}`;
        }
        loc.replace(url.href);
    }
})();