69shuba auto 書簽

创建于 2024年03月05日
更新于 vor 5 Monaten
自動書籤,更改css,可以在看書頁找到作者連結
#小说网站
#阅读优化
#样式美化
数据统计
总安装量
2.9K
近 24 小时
+2
用户评分
-
69shuba/.twkan 小说站自动书签与样式美化脚本
<html lang="en"

data-color-mode="auto" data-light-theme="light" data-dark-theme="dark" data-a11y-animated-images="system" data-a11y-link-underlines="true"

<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-primitives-ac2f4b33720c6312.css" />
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-bb3e7caff8347285.css" />
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/global-1832d803adebd2b4.css" />
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/github-cf976967feea1e66.css" />
userjs/README.md at main · Paul-16098/userjs · GitHub
<meta name="hovercard-subject-tag" content="repository:880808751" data-turbo-transient>
<meta name="google-site-verification" content="Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I">
<meta name="user-login" content="">



<meta name="viewport" content="width=device-width">



  <meta name="description" content="Contribute to Paul-16098/userjs development by creating an account on GitHub.">

  <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub">

<link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub">
<meta property="fb:app_id" content="1401488693436528">
<meta name="apple-itunes-app" content="app-id=1477376905, app-argument=https://github.com/Paul-16098/userjs/blob/main/README.md" />

  <meta name="twitter:image" content="https://opengraph.githubassets.com/6d590e6c5b5c837e5ed4d9bbab4b5aec8789c1d967d5383905886e7e0651e85d/Paul-16098/userjs" /><meta name="twitter:site" content="@github" /><meta name="twitter:card" content="summary_large_image" /><meta name="twitter:title" content="userjs/README.md at main · Paul-16098/userjs" /><meta name="twitter:description" content="Contribute to Paul-16098/userjs development by creating an account on GitHub." />
  <meta name="hostname" content="github.com">



    <meta name="expected-hostname" content="github.com">
  <meta name="turbo-cache-control" content="no-cache" data-turbo-transient>

<meta data-hydrostats="publish">
<meta name="turbo-body-classes" content="logged-out env-production page-responsive">
<meta name="release" content="309153364422b3c499922d1a2a6404910a58ed8e" data-turbo-track="reload">
<div class="position-relative header-wrapper js-header-wrapper ">
  <a href="#start-of-content" data-skip-target-assigned="false" class="px-2 tmp-py-4 color-bg-accent-emphasis color-fg-on-emphasis show-on-focus js-skip-to-content">Skip to content</a>

  <span data-view-component="true" class="progress-pjax-loader Progress position-fixed width-full">
<span style="width: 0%;" data-view-component="true" class="Progress-item progress-pjax-loader-bar left-0 top-0 color-bg-accent-emphasis"></span>

<react-partial partial-name="keyboard-shortcuts-dialog" data-ssr="false" data-attempted-ssr="false" data-react-profiling="false"

Navigation Menu

Toggle navigation
  <a class="tmp-mr-lg-3 color-fg-inherit flex-order-2 js-prevent-focus-on-mobile-nav"
    href="/"
    aria-label="Homepage"
    data-analytics-event="{&quot;category&quot;:&quot;Marketing nav&quot;,&quot;action&quot;:&quot;click to go to homepage&quot;,&quot;label&quot;:&quot;ref_page:Marketing;ref_cta:Logomark;ref_loc:Header&quot;}">
    <svg height="32" aria-hidden="true" data-component="Octicon" viewBox="0 0 24 24" version="1.1" width="32" data-view-component="true" class="octicon octicon-mark-github">
<path d="M10.226 17.284c-2.965-.36-5.054-2.493-5.054-5.256 0-1.123.404-2.336 1.078-3.144-.292-.741-.247-2.314.09-2.965.898-.112 2.111.36 2.83 1.01.853-.269 1.752-.404 2.853-.404 1.1 0 1.999.135 2.807.382.696-.629 1.932-1.1 2.83-.988.315.606.36 2.179.067 2.942.72.854 1.101 2 1.101 3.167 0 2.763-2.089 4.852-5.098 5.234.763.494 1.28 1.572 1.28 2.807v2.336c0 .674.561 1.056 1.235.786 4.066-1.55 7.255-5.615 7.255-10.646C23.5 6.188 18.334 1 11.978 1 5.62 1 .5 6.188.5 12.545c0 4.986 3.167 9.12 7.435 10.669.606.225 1.19-.18 1.19-.786V20.63a2.9 2.9 0 0 1-1.078.224c-1.483 0-2.359-.808-2.987-2.313-.247-.607-.517-.966-1.034-1.033-.27-.023-.359-.135-.359-.27 0-.27.45-.471.898-.471.652 0 1.213.404 1.797 1.235.45.651.921.943 1.483.943.561 0 .92-.202 1.437-.719.382-.381.674-.718.944-.943"></path>
  <div class="d-flex flex-1 flex-order-2 text-right d-lg-none gap-2 flex-justify-end">
      <a
        href="/login?return_to=https%3A%2F%2Fgithub.com%2FPaul-16098%2Fuserjs%2Fblob%2Fmain%2FREADME.md"
        class="HeaderMenu-link HeaderMenu-button d-inline-flex f5 no-underline border color-border-default rounded-2 px-2 py-1 color-fg-inherit js-prevent-focus-on-mobile-nav"
        data-hydro-click="{&quot;event_type&quot;:&quot;authentication.click&quot;,&quot;payload&quot;:{&quot;location_in_page&quot;:&quot;site header menu&quot;,&quot;repository_id&quot;:null,&quot;auth_type&quot;:&quot;SIGN_UP&quot;,&quot;originating_url&quot;:&quot;https://github.com/Paul-16098/userjs/blob/main/README.md&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="d6abcb9e419e2ed20211d72942096d14d9689603559500a186a529c9f485065a"
        data-analytics-event="{&quot;category&quot;:&quot;Marketing nav&quot;,&quot;action&quot;:&quot;click to Sign in&quot;,&quot;label&quot;:&quot;ref_page:Marketing;ref_cta:Sign in;ref_loc:Header&quot;}"
      >
        Sign in
      </a>
          <div class="AppHeader-appearanceSettings">
<react-partial-anchor>        <button data-target="react-partial-anchor.anchor" id="icon-button-c6267906-e4ff-47b1-939f-83094ee1237b" aria-labelledby="tooltip-b2057678-7bf8-480d-94aa-3b6be79ceaa9" type="button" disabled="disabled" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium AppHeader-button HeaderMenu-link border cursor-wait">  <svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-sliders Button-visual">
<path d="M15 2.75a.75.75 0 0 1-.75.75h-4a.75.75 0 0 1 0-1.5h4a.75.75 0 0 1 .75.75Zm-8.5.75v1.25a.75.75 0 0 0 1.5 0v-4a.75.75 0 0 0-1.5 0V2H1.75a.75.75 0 0 0 0 1.5H6.5Zm1.25 5.25a.75.75 0 0 0 0-1.5h-6a.75.75 0 0 0 0 1.5h6ZM15 8a.75.75 0 0 1-.75.75H11.5V10a.75.75 0 1 1-1.5 0V6a.75.75 0 0 1 1.5 0v1.25h2.75A.75.75 0 0 1 15 8Zm-9 5.25v-2a.75.75 0 0 0-1.5 0v1.25H1.75a.75.75 0 0 0 0 1.5H4.5v1.25a.75.75 0 0 0 1.5 0v-2Zm9 0a.75.75 0 0 1-.75.75h-6a.75.75 0 0 1 0-1.5h6a.75.75 0 0 1 .75.75Z"></path>
Appearance settings

<react-partial partial-name="appearance-settings" data-ssr="false" data-attempted-ssr="false" data-react-profiling="false"

  </div>
</div>


<div class="HeaderMenu js-header-menu height-fit position-lg-relative d-lg-flex flex-column flex-auto top-0">
  <div class="HeaderMenu-wrapper d-flex flex-column flex-self-start flex-lg-row flex-auto rounded rounded-lg-0">
      <link crossorigin="anonymous" rel="modulepreload" href="https://github.githubassets.com/assets/71236-18053476e03a7169.js" fetchpriority="low" />

<react-partial partial-name="marketing-navigation" data-ssr="true" data-attempted-ssr="true" data-react-profiling="false"

    <div class="d-flex flex-column flex-lg-row width-full flex-justify-end flex-lg-items-center text-center tmp-mt-3 tmp-mt-lg-0 text-lg-left tmp-ml-lg-3">
            
Search or jump to...
<input type="hidden" name="type" class="js-site-search-type-field">

Search code, repositories, users, issues, pull requests...

      <div data-view-component="true">        <div class="search-suggestions position-fixed width-full color-shadow-large border color-fg-default color-bg-default overflow-hidden d-flex flex-column query-builder-container"
      style="border-radius: 12px;"
      data-target="qbsearch-input.queryBuilderContainer"
      hidden
    >
      <!-- '"` --><!-- </textarea></xmp> --></option></form><form id="query-builder-test-form" action="" accept-charset="UTF-8" method="get">
Search
Clear
      </span>
  </div>
  <template id="search-icon">
    <div class="position-relative">
                    <ul
          role="listbox"
          class="ActionListWrap QueryBuilder-ListWrap"
          aria-label="Suggestions"
          data-action="
            combobox-commit:query-builder#comboboxCommit
            mousedown:query-builder#resultsMousedown
          "
          data-target="query-builder.resultsList"
          data-persist-list=false
          id="query-builder-test-results"
          tabindex="-1"
        ></ul>

    </div>
  <div class="FormControl-inlineValidation" id="validation-72586363-b2c1-431e-ab30-59f95a56a6fd" hidden="hidden">
    <span class="FormControl-inlineValidation--visual">
      <svg aria-hidden="true" data-component="Octicon" height="12" viewBox="0 0 12 12" version="1.1" width="12" data-view-component="true" class="octicon octicon-alert-fill">
<path d="M4.855.708c.5-.896 1.79-.896 2.29 0l4.675 8.351a1.312 1.312 0 0 1-1.146 1.954H1.33A1.313 1.313 0 0 1 .183 9.058ZM7 7V3H5v4Zm-1 3a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"></path>
</div>

Provide feedback

</div>
<div class="Overlay-actionWrap">
  <button data-close-dialog-id="feedback-dialog" aria-label="Close" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x">
<path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path>

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted
Cancel Submit feedback
<custom-scopes data-target="qbsearch-input.customScopesManager">

Saved searches

Use saved searches to filter your results more quickly

    <div hidden class="create-custom-scope-form" data-target="custom-scopes.createCustomScopeForm">
    <!-- '"` --><!-- </textarea></xmp> --></option></form><form id="custom-scopes-dialog-form" data-turbo="false" action="/search/custom_scopes" accept-charset="UTF-8" method="post"><input type="hidden" name="authenticity_token" value="Ix7TS7PD6h6Pl9xk3Kk_EZ76oHzTGzflSqLSzVUEMpQwngSmJ7A-dUURC_dbnQx6GVtcRPbRDcucnE9hYlmf4Q" />
      <div data-target="custom-scopes.customScopesModalDialogFlash"></div>

      <input type="hidden" id="custom_scope_id" name="custom_scope_id" data-target="custom-scopes.customScopesIdField">

      <div class="form-group">
        <label for="custom_scope_name">Name</label>
        <auto-check src="/search/custom_scopes/check_name" required>
          <input
            type="text"
            name="custom_scope_name"
            id="custom_scope_name"
            data-target="custom-scopes.customScopesNameField"
            class="form-control"
            autocomplete="off"
            placeholder="github-ruby"
            required
            maxlength="50">
          <input type="hidden" value="QOJf6PieKgKXljjRUw70DTP53N1w7lIRjdGlAvgJOBEznXGSFAUXZqqvu2l4T_D9Z8AFjpAQ6yY18KcEAvyyGQ" data-csrf="true" />
        </auto-check>
      </div>

      <div class="form-group">
        <label for="custom_scope_query">Query</label>
        <input
          type="text"
          name="custom_scope_query"
          id="custom_scope_query"
          data-target="custom-scopes.customScopesQueryField"
          class="form-control"
          autocomplete="off"
          placeholder="(repo:mona/a OR repo:mona/b) AND lang:python"
          required
          maxlength="500">
      </div>

      <p class="text-small color-fg-muted">
        To see all available qualifiers, see our <a class="Link--inTextBlock" href="https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax">documentation</a>.
      </p>
    <div data-target="custom-scopes.manageCustomScopesForm">
      <div data-target="custom-scopes.list"></div>
    </div>
Cancel Create saved search
        <div class="position-relative HeaderMenu-link-wrap d-lg-inline-block">
          <a
            href="/login?return_to=https%3A%2F%2Fgithub.com%2FPaul-16098%2Fuserjs%2Fblob%2Fmain%2FREADME.md"
            class="HeaderMenu-link HeaderMenu-link--sign-in HeaderMenu-button flex-shrink-0 no-underline d-none d-lg-inline-flex border border-lg-0 rounded px-2 py-1"
            style="margin-left: 12px;"
            data-hydro-click="{&quot;event_type&quot;:&quot;authentication.click&quot;,&quot;payload&quot;:{&quot;location_in_page&quot;:&quot;site header menu&quot;,&quot;repository_id&quot;:null,&quot;auth_type&quot;:&quot;SIGN_UP&quot;,&quot;originating_url&quot;:&quot;https://github.com/Paul-16098/userjs/blob/main/README.md&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="d6abcb9e419e2ed20211d72942096d14d9689603559500a186a529c9f485065a"
            data-analytics-event="{&quot;category&quot;:&quot;Marketing nav&quot;,&quot;action&quot;:&quot;click to go to homepage&quot;,&quot;label&quot;:&quot;ref_page:Marketing;ref_cta:Sign in;ref_loc:Header&quot;}"
          >
            Sign in
          </a>
        </div>

          <a href="/signup?ref_cta=Sign+up&amp;ref_loc=header+logged+out&amp;ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fblob%2Fshow&amp;source=header-repo&amp;source_repo=Paul-16098%2Fuserjs"
            class="HeaderMenu-link HeaderMenu-link--sign-up HeaderMenu-button flex-shrink-0 d-flex d-lg-inline-flex no-underline border color-border-default rounded px-2 py-1"
            data-hydro-click="{&quot;event_type&quot;:&quot;authentication.click&quot;,&quot;payload&quot;:{&quot;location_in_page&quot;:&quot;site header menu&quot;,&quot;repository_id&quot;:null,&quot;auth_type&quot;:&quot;SIGN_UP&quot;,&quot;originating_url&quot;:&quot;https://github.com/Paul-16098/userjs/blob/main/README.md&quot;,&quot;user_id&quot;:null}}" data-hydro-click-hmac="d6abcb9e419e2ed20211d72942096d14d9689603559500a186a529c9f485065a"
            data-analytics-event="{&quot;category&quot;:&quot;Sign up&quot;,&quot;action&quot;:&quot;click to sign up for account&quot;,&quot;label&quot;:&quot;ref_page:/&lt;user-name&gt;/&lt;repo-name&gt;/blob/show;ref_cta:Sign up;ref_loc:header logged out&quot;}"
          >
            Sign up
          </a>

            <div class="AppHeader-appearanceSettings">
<react-partial-anchor>        <button data-target="react-partial-anchor.anchor" id="icon-button-90484dae-6630-42ba-9870-ab365dc89b34" aria-labelledby="tooltip-c83ea88c-738f-4eae-aee8-0887efd7c1ef" type="button" disabled="disabled" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium AppHeader-button HeaderMenu-link border cursor-wait">  <svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-sliders Button-visual">
<path d="M15 2.75a.75.75 0 0 1-.75.75h-4a.75.75 0 0 1 0-1.5h4a.75.75 0 0 1 .75.75Zm-8.5.75v1.25a.75.75 0 0 0 1.5 0v-4a.75.75 0 0 0-1.5 0V2H1.75a.75.75 0 0 0 0 1.5H6.5Zm1.25 5.25a.75.75 0 0 0 0-1.5h-6a.75.75 0 0 0 0 1.5h6ZM15 8a.75.75 0 0 1-.75.75H11.5V10a.75.75 0 1 1-1.5 0V6a.75.75 0 0 1 1.5 0v1.25h2.75A.75.75 0 0 1 15 8Zm-9 5.25v-2a.75.75 0 0 0-1.5 0v1.25H1.75a.75.75 0 0 0 0 1.5H4.5v1.25a.75.75 0 0 0 1.5 0v-2Zm9 0a.75.75 0 0 1-.75.75h-6a.75.75 0 0 1 0-1.5h6a.75.75 0 0 1 .75.75Z"></path>
Appearance settings

<react-partial partial-name="appearance-settings" data-ssr="false" data-attempted-ssr="false" data-react-profiling="false"

      <button type="button" class="sr-only js-header-menu-focus-trap d-block d-lg-none">Resetting focus</button>
    </div>
  </div>
</div>
  <div hidden="hidden" data-view-component="true" class="js-stale-session-flash stale-session-flash flash flash-warn flash-full">

    <svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert">
<path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path>
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
<button id="icon-button-9db13561-0226-4da9-92f6-c7863b7ff7d5" aria-labelledby="tooltip-eff02c73-b851-47b9-a469-5193ffb3e1e0" type="button" data-view-component="true" class="Button Button--iconOnly Button--invisible Button--medium flash-close js-flash-close">  <svg aria-hidden="true" data-component="Octicon" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x Button-visual">
<path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path>
Dismiss alert
<div id="js-flash-container" class="flash-container" data-turbo-replace>
  <div>{{ message }}</div>

</div>
  <div class="d-flex flex-nowrap flex-justify-end tmp-mb-3  tmp-px-3 tmp-px-lg-5" style="gap: 1rem;">

    <div class="flex-auto min-width-0 width-fit">
        
<span class="author flex-self-stretch" itemprop="author">
  <a class="url fn" rel="author" data-hovercard-type="user" data-hovercard-url="/users/Paul-16098/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="/Paul-16098">
    Paul-16098

/ userjs

<span></span><span class="Label Label--secondary v-align-middle mr-1">Public</span>
    </div>

    <div id="repository-details-container" class="flex-shrink-0" data-turbo-replace style="max-width: 70%;">
        <ul class="pagehead-actions flex-shrink-0 d-none d-md-inline" style="padding: 2px 0;">

  
  • Notifications You must be signed in to change notification settings
  • Fork 0
  •     </div>
      </div>
    
        <div id="responsive-meta-container" data-turbo-replace>
    
          <nav data-pjax="#js-repo-pjax-container" aria-label="Repository" data-view-component="true" class="js-repo-nav js-sidenav-container-pjax js-responsive-underlinenav overflow-hidden UnderlineNav px-3 tmp-px-3 px-md-4 tmp-px-md-4 px-lg-5 tmp-px-lg-5">
    
    Additional navigation options
      <div data-view-component="true" class="Overlay-body Overlay-body--paddingNone">          <action-list>
    

    <react-app app-name="code-view" initial-path="/Paul-16098/userjs/blob/main/README.md" style="display: block; min-height: calc(100vh - 64px);" data-attempted-ssr="true" data-ssr="true" data-lazy="false" data-alternate="false" data-data-router-enabled="true" data-react-profiling="false"

    Latest commit

     

    History

    History
    145 lines (106 loc) · 6.45 KB
    main

    README.md

    Top

    File metadata and controls

    • Preview
    • Code
    • Blame
    145 lines (106 loc) · 6.45 KB

    userjs — Tampermonkey/Greasemonkey 使用者腳本集合

    本倉庫是一個以 TypeScript 撰寫、以 SWC 編譯的使用者腳本(Userscripts)單一倉庫(monorepo)。每個資料夾代表一組對應網站的腳本。

    • 腳本管理器:建議使用 Tampermonkey(Chrome/Edge/Firefox 等)或 Greasemonkey/Violentmonkey
    • 分支慣例:開發分支 dev、預設分支 main

    快速安裝(使用者)

    1. 先安裝瀏覽器擴充:Tampermonkey(或相容管理器)

    2. 點擊下列「安裝」連結(指向 GitHub raw 的 dev 分支):

    安裝後,Tampermonkey 會提示新增腳本,按「安裝」即可。

    提示:上述連結使用 dev 分支的 raw 檔案,方便追到最新版。若要使用穩定版,請改用 main 分支路徑。

    專案結構與慣例

    • 一個資料夾對應一個網站/腳本:
      • 例如 69shuba auto 書簽/czbooksnet/琉璃神社/ixdzs8tw/
      • 內含 *.user.ts 入口檔(編譯成同名 .user.js)、可選的 CSS/JSON 資源、與局部 tsconfig.json
    • 共享工具放在 Tools/Tools.user.ts,其他腳本以 Tampermonkey @require 引入(並搭配 Tools.user.d.ts 提供型別)
    • SWC 以 VS Code Tasks 執行(專案未提交 .swcrc,設定由 Tasks 參數提供)
    • 腳本中常見模式:
      • 透過 Tools 提供的 setMenui18nremoveElementnewEval 等輔助
      • 需要樣式時以 @resource + GM_getResourceText + GM_addStyle 注入

    開發與建置(貢獻者)

    前置需求:

    • Node.js(可用 npx)
    • VS Code(建議,因已內建 Tasks)
    • Tampermonkey(本機測試)

    步驟:

    1. 在 VS Code 中執行 Tasks
      • 單次編譯:任務「swc: build」— 會編譯所有 **/*.user.ts 為同目錄下的 .user.js 與來源對應檔(source maps)
      • 監看模式:任務「swc: watch」— 開發時持續編譯
    2. 編譯設定(由 Tasks 參數提供):
      • TypeScript parser、module=commonjstarget=esnextminify=truesourceMaps=truecomments=all
    3. 腳本約定:
      • 每個資料夾一份局部 tsconfig.json,輸出至同資料夾
      • 共用型別:於腳本頂部加入 /// <reference path="./../Tools/Tools.user.d.ts"/>

    若需要以指令執行:亦可直接在專案根目錄執行 swc(但通常以 VS Code Tasks 為主)。

    條件式 @require 與版本號規範

    本倉庫提供 update_version.pyF.json 控制「本地開發」與「遠端引用」。維護腳本頭部的 @version@require 條件區塊。

    • F.json{ "debug": true }:啟用本地 file://@require
    • { "debug": false }:保留遠端 @require(指向本倉庫 dev 分支 raw 檔案)

    請在新腳本維持下列區塊形狀,供 update_version.py 正確處理(勿更動註解符號與縮排):

    //#if debug
    // #@require file://C:\\Users\\p\\Documents\\git\\userjs\\Tools\\Tools.user.js
    //#else
    // @require https://github.com/Paul-16098/userjs/raw/dev/Tools/Tools.user.js
    //#endif
    

    update_version.py 也會清理 // @version 行,將如 -beta* 等尾碼移除,統一為純數字。

    共享工具(Tools)

    • 檔案:Tools/Tools.user.ts(輸出 Tools.user.jsTools.user.d.ts
    • 功能重點:
      • removeElement(...selectors):移除不需要的 DOM 節點
      • setMenu(name, fn?, def?, showMapping?):註冊/切換 GM 選單與配置
      • i18n:簡易鍵值翻譯;t(key, ...args) 取得字串
      • newEval(code, safety=true):安全地評估簡單運算字串
      • setGM():對齊不同腳本管理器的 GM API 差異
    • 型別支援:在各腳本加上 /// <reference path="./../Tools/Tools.user.d.ts"/> 取得型別提示

    載入 CSS/JSON 資源的慣例

    • 在腳本 metadata header 中加入 @resource
    • 於程式中:
      • const css = GM_getResourceText("css1");
      • GM_addStyle(css);

    可參考 czbooksnet/czbooksnet.user.ts 的作法。

    資料夾導覽

    <repo-root>
    ├─ 69shuba auto 書簽/
    │  ├─ 69shuba auto 書簽.user.ts  # 入口 TypeScript(輸出同名 .user.js)
    │  ├─ *.less / *.css / *.json     # 可選資源,與腳本同層
    │  └─ tsconfig.json               # 區域 TS 設定(emit 到同資料夾)
    ├─ 琉璃神社/
    ├─ czbooksnet/
    ├─ ixdzs8tw/
    ├─ Tools/
    │  ├─ Tools.user.ts               # 共享工具(搭配 d.ts 型別)
    │  └─ Tools.user.d.ts
    ├─ update_version.py              # 正規化 @version 與條件式 @require
    ├─ F.json                         # 旗標(例如 { "debug": false })
    ├─ package.json                   # npx swc 由 VS Code Tasks 呼叫
    └─ LICENSE.txt
    

    釋出與版本

    • 開發:主要在 dev 分支演進,raw 連結指向 refs/heads/dev 以便測試
    • 穩定:合併至 main 後視需求更新文件
    • 版本號:使用 update_version.py 正規化版本欄位

    常見問題(FAQ)

    • 為什麼看到成對的 @require
      • 這是條件化區塊,debug=true 時啟用本地 file://,否則使用遠端 raw 檔,利於本地開發與發佈切換
    • 我需要另外安裝 Tools.user.js 嗎?
      • 不需要。各腳本會以 @require 引入;只要從上方「安裝」連結安裝對應腳本即可
    • 我要如何為某網站新增一支腳本?
      1. 新增資料夾,複製相鄰資料夾的 tsconfig.json
      2. 建立 Your Script.user.ts,參考現有檔案的 metadata header 與條件式 @require
      3. 如需樣式或資料,將資源檔放同資料夾,並以 @resource 載入
      4. 以「swc: watch」開發,完成後執行 update_version.py

    貢獻

    歡迎 Issue/PR。請維持:

    • 一個資料夾一支腳本的結構
    • 嚴謹的 TypeScript 型別
    • 一致的 metadata header 與條件式 @require 區塊
    • 最小必要的 @grant 權限

    提交訊息格式可參考倉庫內規範(如「git 提交信息規範」)。

    授權

    授權內容請見根目錄 LICENSE.txt

    </main>
    
          <footer class="footer tmp-pt-7 tmp-pb-6 f6 color-fg-muted color-border-subtle p-responsive" role="contentinfo" >
    

    Footer

    © 2026 GitHub, Inc.
    <nav aria-label="Footer">
      <h3 class="sr-only" id="sr-footer-heading">Footer navigation</h3>
    
      <ul class="list-style-none d-flex flex-justify-center flex-wrap mb-2 mb-lg-0" aria-labelledby="sr-footer-heading">
    
    
          <li class="mx-2">
            <a data-analytics-event="{&quot;category&quot;:&quot;Footer&quot;,&quot;action&quot;:&quot;go to Terms&quot;,&quot;label&quot;:&quot;text:terms&quot;}" href="https://docs.github.com/site-policy/github-terms/github-terms-of-service" data-view-component="true" class="Link--secondary Link">Terms</a>
          </li>
    
          <li class="mx-2">
            <a data-analytics-event="{&quot;category&quot;:&quot;Footer&quot;,&quot;action&quot;:&quot;go to privacy&quot;,&quot;label&quot;:&quot;text:privacy&quot;}" href="https://docs.github.com/site-policy/privacy-policies/github-privacy-statement" data-view-component="true" class="Link--secondary Link">Privacy</a>
          </li>
    
          <li class="mx-2">
            <a data-analytics-event="{&quot;category&quot;:&quot;Footer&quot;,&quot;action&quot;:&quot;go to security&quot;,&quot;label&quot;:&quot;text:security&quot;}" href="https://github.com/security" data-view-component="true" class="Link--secondary Link">Security</a>
          </li>
    
          <li class="mx-2">
            <a data-analytics-event="{&quot;category&quot;:&quot;Footer&quot;,&quot;action&quot;:&quot;go to status&quot;,&quot;label&quot;:&quot;text:status&quot;}" href="https://www.githubstatus.com/" data-view-component="true" class="Link--secondary Link">Status</a>
          </li>
    
          <li class="mx-2">
            <a data-analytics-event="{&quot;category&quot;:&quot;Footer&quot;,&quot;action&quot;:&quot;go to community&quot;,&quot;label&quot;:&quot;text:community&quot;}" href="https://github.community/" data-view-component="true" class="Link--secondary Link">Community</a>
          </li>
    
          <li class="mx-2">
            <a data-analytics-event="{&quot;category&quot;:&quot;Footer&quot;,&quot;action&quot;:&quot;go to docs&quot;,&quot;label&quot;:&quot;text:docs&quot;}" href="https://docs.github.com/" data-view-component="true" class="Link--secondary Link">Docs</a>
          </li>
    
          <li class="mx-2">
            <a data-analytics-event="{&quot;category&quot;:&quot;Footer&quot;,&quot;action&quot;:&quot;go to contact&quot;,&quot;label&quot;:&quot;text:contact&quot;}" href="https://support.github.com?tags=dotcom-footer" data-view-component="true" class="Link--secondary Link">Contact</a>
          </li>
    
          <li class="mx-2" >
    
    Manage cookies
  • Do not share my personal information
  •   </ul>
    </nav>
    
    <ghcc-consent id="ghcc" class="position-fixed bottom-0 left-0" style="z-index: 999999"
      data-locale="en"
      data-initial-cookie-consent-allowed=""
      data-cookie-consent-required="false"
    ></ghcc-consent>
    
    You can’t perform that action at this time.
    <template id="site-details-dialog">
    
    <div class="Popover js-hovercard-content position-absolute" style="display: none; outline: none;">
    
    <template id="snippet-clipboard-copy-button">
    
    </div>
    <div id="js-global-screen-reader-notice" class="sr-only mt-n1" aria-live="polite" aria-atomic="true" ></div>
    <div id="js-global-screen-reader-notice-assertive" class="sr-only mt-n1" aria-live="assertive" aria-atomic="true"></div>
    
    权限与访问
    使用能力
    存储菜单命令打开标签页