• Browser
  • Mail
  • News
  • Community
  • About
Register Login
HomeBlogsForumThemesContributeSocial

Vivaldi

  • Browser
  • Mail
  • News
  • Community
  • About

Navigation

    • Home
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    We will be doing maintenance work on Vivaldi Translate on the 11th of May starting at 03:00 (UTC) (see the time in your time zone).
    Some downtime and service disruptions may be experienced.
    Thanks in advance for your patience.

    1. Home
    2. Local Forum
    3. 日本語 (Japanese)
    4. 便利情報
    5. 【UserScript】 FastForward(早送り)の対応サイトを少しだけ増やす

    【UserScript】 FastForward(早送り)の対応サイトを少しだけ増やす

    便利情報
    便利情報
    3
    3
    2.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • nafumofu
      N
      nafumofu
      last edited by Takaaki

      FastForwardの対応サイトを少しだけ増やすことができるユーザースクリプトを作成しました。
      簡単なスクリプトですが使っていただけるのなら幸いです。

      導入方法

      1. ChromeウェブストアからTampermonkeyをインストールします
      2. Tampermonkeyの拡張機能ボタンを押して、メニューの「新規スクリプトを追加...」をクリックします
      3. 新規スクリプト画面のテキストエリアのテキストを「すべて選択」して削除します
      4. 下記のコードをテキストエリアにコピー&ペーストして保存します

      UserScript

      // ==UserScript==
      // @name         FastForward Enhancer
      // @version      0.4
      // @match        http://*/*
      // @match        https://*/*
      // @grant        none
      // @noframes
      // ==/UserScript==
      
      const FF_MATCHES = [
          /^Next( Page)?(\n|\s*.{0,3}$)/i,
          /^次(へ|のページ)?(\n|\s*.{0,3}$)/,
          /→$/,
      ];
      
      const getNextLink = () => {
          var nodes = document.querySelectorAll('a[href]:not([href^="#"]):not([href^="javascript:"])');
          
          for (let re of FF_MATCHES) {
              for (let node of nodes) {
                  if (node.origin !== location.origin)
                      continue;
                  
                  if (re.test(node.textContent.trim()) || re.test(node.title.trim()))
                      return node.href;
              }
          }
      }
      
      const addNextLink = () => {
          var nextLink = getNextLink();
          
          if (nextLink) {
              var link = document.createElement('link');
              link.rel = 'next';
              link.href = nextLink;
              document.head.prepend(link);
          }
      }
      
      addNextLink();
      

      更新履歴

      0.1 (2018-09-29)

      • 初版

      0.2 (2018-09-29)

      • # と javascript: から始まるリンクを次ページ検出の対象から除外

      0.3 (2018-09-29)

      • 次ページ検出の除外処理が正常に動作しない問題を修正

      0.4 (2018-09-29)

      • 次ページ検出の除外処理をCSSセレクターで行うように変更

      I use machine translation to read and write English.

      1 Reply Last reply Reply Quote 1
      • NEARJP
        N
        NEARJP Translator
        last edited by

        こんにちは、Sopranoのひとり、NEARです。

        こんなやり方があったんですね!
        FastForward機能は、サイトによって使えるときと使えないときが出てきますよね。
        情報、ありがとうございます!

        Takaaki
        T
        1 Reply Last reply
        Reply Quote 0
        • Takaaki
          T
          Takaaki Translator @NEARJP
          last edited by

          @nafumofu

          便利なスクリプトありがとうございます😀
          フォーラムでピン留めしました。

          Volunteer tester, translator & ambassador

          1 Reply Last reply Reply Quote 0
          Loading More Posts
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes
          Reply
          • Reply as topic
          Log in to reply
          • 1 / 1
          • First post
            Last post

          Looks like your connection to Vivaldi Forum was lost, please wait while we try to reconnect.

          Copyright © Vivaldi Technologies™ — All rights reserved. Privacy Policy | Code of conduct | Terms of use | Vivaldi Status