BS_Library

Bibliothek mit nützlichen Funktionen für BS Userscripte.

This script should not be not be installed directly. It is a library for other scripts to include with the meta directive // @require https://update.greasyfork.org/scripts/375096/755975/BS_Library.js

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Аўтар
Asu_nyan
Версія
1.4.2
Створаны
02.12.2018
Абноўлены
07.12.2019
Памер
7.1 КБ
Ліцэнзія
Н/Д

Diese Bibliothek enthält folgende Funktionen:

Zusatzinfo: Das Object: BS ist an window gebunden. Also window.BS.

Global

  • BS.Global.SecurityToken() Gibt den SecurityToken zurück, welcher benötigt wird, um bestimmte Aktionen durchführen zu können.
    • Return: String

Series

  • BS.Series.ID() Gibt die ID der Serie zurück, auf welcher man sich gerade befindet (falls man sich auf einer befindet).
    • Return: Number

Audio

  • BS.Audio.Notification
    • String; URL zur MP3-Datei der Standard Forum-Notification.

Image

  • BS.Image.PN

    • String; URL zu einem geeigneten Icon, welches für die Notification API verwendet werden kann.
  • BS.Image.Favicon

    • String; URL zum Favicon von BS.

Module

  • BS.Module.Update(Selector)

    • Selector: String; ID des Moduls, welches geupdated werden soll, in Form eines CSS-Selectors.
    • Return: Void
  • BS.Module.MultiUpdate(SelectorList)

    • SelectorList: Array<String>; Liste von IDs der Module, welche geupdated werden sollen, in Form von CSS-Selector.
    • Return: Void
  • BS.Module.Get(Selector)

    • Selector: String; ID eines Moduls, in Form eines CSS-Selectors.
    • Return: Element

Helper

  • BS.Helper.InjectCSS(Link, CSS) Wenn ein Link vorhanden ist, wird dieser als <link> im <head> des Dokuments eingefügt. Wenn CSS vorhanden ist, wird der Code als <style> im <head> des Dokuments eingefügt.

    • Link: String; Link zu einer CSS-Datei.
    • CSS: String; CSS Code.
    • Return: Void
  • BS.Helper.InjectScript(Link, Code) Wenn ein Link vorhanden ist, wird dieser als <script> am <body> angehängt. Wenn Code vorhanden ist, wird er als Text innerhalb von <script> am <body> angehängt.

    • Link: String; Link zu einer JS-Datei.
    • Code: String; JavaScript Code.
    • Return: Void
  • BS.Helper.RemoveDuplicates(Array) Entfernt redundante Eintrage eines Arrays und gibt das neue Array zurück.

    • Array: Array<Number>
    • Return: Array<Number>
  • BS.PN.Send(Options) Sendet eine Private Nachricht mit den angegebenen Optionen.

    • Options: Object
    • Options.to: String; Empfänger
    • Options.subject: String; Betreff
    • Options.text: String; Nachricht
    • Return: Void
  • BS.PN.NotifyIfNew() Überprüft das Postfach einmal und sendet eine Desktop-Benachrichtigung, wenn neue, ungelesene Nachrichten vorhanden sind.

    • Return: Void

Favorites

  • BS.Favorites.Get(Callback) Holt die Liste der eingetragenen Favoriten.

    • Callback: function(List: Array<Number>); Eine Funktion um die etwas mit der Liste anzustellen.
    • Return: Void
  • BS.Favorites.Save(Favorites, Reload)

    • Favorites: Array<Number>; Liste der Favoriten-IDs.
    • Reload: Boolean; Bestimmt, ob nach dem Speichern die Liste in im Navigationsmenü geupdated werden soll.
    • Return: Void