ReadOnlyMind Scroll Position Tracking

Keep your place on the stories you're reading!

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램을 설치해야 합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

Advertisement:

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

Advertisement:

// ==UserScript==
// @name            ReadOnlyMind Scroll Position Tracking
// @description     Keep your place on the stories you're reading!
// @version         2.0.1
// @author          Anonymous
// @namespace       861ddd094884eac5bea7a3b12e074f34
// @license         MIT
// @require         https://update.greasyfork.org/scripts/583749/1856870/Scroll%20Position%20Tracking%20Library.js
// @match           https://readonlymind.com/@*
// @match           https://web.archive.org/web/*/https://readonlymind.com/@*
// @match           https://archive.today/*
// @match           https://archive.is/*
// @match           https://archive.ph/*
// @icon            https://external-content.duckduckgo.com/ip3/readonlymind.com.ico
// @run-at          document-end
// @inject-into     content
// @grant           none
// ==/UserScript==

/* Attribution
 ****************

   - Adapted from spin-drift's AO3 Bunker, itself adapted from code by jcunews
       https://greasyfork.org/en/scripts/567423-ao3-bunker
       https://www.reddit.com/r/userscripts/comments/1ayfnoh/add_scroll_position_to_url_is_this_possible/

*/

(async function () {
    'use strict';

    let CONFIG = {
        origins: [{
            host: 'readonlymind.com',
            path: /^(\/@[^\/]+\/[^\/]+(?:\/\d+)?)/
        }],
        // Delay between ceasing scroll and saving position (ms)
        save_delay: 500,
        // TTL of individually cached scroll positions (days)
        ttl: 42,
        // Smooth-scroll to saved position on restore
        animate_restore: true,
        // Duration of the scroll animation (ms)
        animation_length: 1000,
        // Max waiting period for page height check (s)
        // https://backlinko.com/page-speed-stats
        timeout: 30,
        // Verbose logging
        debug: false,
    }

    await ScrollPositionTracker.init(CONFIG);
})();