Greasy Fork is available in English.

AO3Boxicons

Reusable library that initialized the boxicons css and serves functions to turn stats and menus into icons

此腳本不應該直接安裝,它是一個供其他腳本使用的函式庫。欲使用本函式庫,請在腳本 metadata 寫上: // @require https://update.greasyfork.org/scripts/497064/1475224/AO3Boxicons.js

作者
genusslicht
版本
1.2
建立日期
2024-06-04
更新日期
2024-08-23
授權條款
MIT

Basic Usage

Create a new User Script with content that looks roughly like this:

// ==UserScript==
// @name        AO3 Stat Icons
// @match       https://archiveofourown.org/*
// @author      you
// @description Adds icons for stats
// @namespace   ao3-fonts-and-icons
// @version     1.0.0
// @icon        https://archiveofourown.org/favicon.ico
// @require     https://update.greasyfork.org/scripts/497064/1472056/AO3Boxicons.js
// ==/UserScript==

(function () {
  IconifyAO3({
    iconifyStats: true,
    iconifyUserNav: true,
  });
})();

Will turn the Stat names and the user navigation links into icons.

Settings

All described properties have to be in the settings object that is given to IconifyAO3.

  • boxiconsVersion: String - used version of boxicons. (default: "2.1.4", check boxicons.com for updates)
  • iconifyStats: Boolean - if set to true, stat titles will be turned into icons. (default: false)
  • statsSettings: Object - sets individual options for stat icons. See below. (default: {}. Leaves all stat icons as picked by me)
  • iconifyUserNav: Boolean - if set to true, user navigation texts will be turned into icons. (default: false)
  • userNavSettings: Object - sets individual options for user nav icons. See below. (default: {}. Leaves all navigation icons as picked by me)

Individual Stat Icons

Define individual icons and tooltips, using the statsSettings object.

Properties

  • iconClass: String - name of boxicon icon (see https://boxicons.com)
  • solid: Boolean - sets the icon as solid or not. See selected icon properties on https://boxicons.com
  • tooltip: String - description that shows on mouse hover. Default is stats titles.

Example

{
  statsSettings: {
    kudosOptions: { solid: false }
  }
}

Will turn the solid heart for kudos into an unsolid heart. Note that the default settings will stay intact if not overwritten here.

List of possible Options

wordCountOptions, chaptersOptions, collectionsOptions, commentsOptions, kudosOptions, bookmarksOptions, hitsOptions, workSubsOptions, authorSubsOptions, commentThreadsOptions, fandomsOptions, workCountOptions, seriesCompleteOptions, kudos2HitsOptions, timeToReadOptions, dateWorkPublishedOptions, dateWorkUpdateOptions, dateWorkCompleteOptions

Individual User Navigation Icons

Define individual icons and tooltips, using the userNavSettings object.

Properties

  • iconClass: String - name of boxicon icon (see https://boxicons.com)
  • solid: Boolean - sets the icon as solid or not. See selected icon properties on https://boxicons.com
  • tooltip: String - description that shows on mouse hover.

Example

{
  userNavSettings: {
    accountOptions: { iconClass: "user-rectangle" }
  }
}

Will turn the round user icon into a rectangular one. Note that the default settings will stay intact if not overwritten here.

List of possible Options

accountOptions, postNewOptions, logoutOptions