Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FluffCore

"Fluff" module is used for reverting vandalism. It offers several types of revert modes.

Localisation: You may wish to customise trustedBots. Apart from that, this module should work without any further configuration.

Hierarchy

Index

Constructors

constructor

Properties

addLinks

addLinks: { contributions: () => void; diff: () => void; history: () => void; oldid: () => void; recentchanges: () => void } = ...

Type declaration

  • contributions: () => void
      • (): void
      • Returns void

  • diff: () => void
      • (): void
      • Returns void

  • history: () => void
      • (): void
      • Returns void

  • oldid: () => void
      • (): void
      • Returns void

  • recentchanges: () => void
      • (): void
      • Returns void

callbacks

callbacks: { complete: (pageobj: any) => void; main: (apiobj: any) => void; toRevision: (pageobj: any) => void } = ...

Type declaration

  • complete: (pageobj: any) => void
      • (pageobj: any): void
      • Parameters

        • pageobj: any

        Returns void

  • main: (apiobj: any) => void
      • (apiobj: any): void
      • Parameters

        • apiobj: any

        Returns void

  • toRevision: (pageobj: any) => void
      • (pageobj: any): void
      • Parameters

        • pageobj: any

        Returns void

flaggedRevsEnabled

flaggedRevsEnabled: boolean = !!mw.loader.moduleRegistry['ext.flaggedRevs.basic']

footerlinks

footerlinks: {}

Set of links shown in the bottom right of the module dialog. Object keys are labels and values are the wiki page names.

Type declaration

  • [label: string]: string

linkBuilder

linkBuilder: { buildLink: (color: any, text: any) => HTMLAnchorElement; restoreThisRevisionLink: (revisionRef: any, inline?: boolean) => HTMLElement; rollbackLinks: (vandal: any, inline?: boolean, rev?: any, page?: any) => HTMLElement; spanTag: (color: any, content: any) => HTMLSpanElement } = ...

Type declaration

  • buildLink: (color: any, text: any) => HTMLAnchorElement
      • (color: any, text: any): HTMLAnchorElement
      • Parameters

        • color: any
        • text: any

        Returns HTMLAnchorElement

  • restoreThisRevisionLink: (revisionRef: any, inline?: boolean) => HTMLElement
      • (revisionRef: any, inline?: boolean): HTMLElement
      • Parameters

        • revisionRef: any
        • inline: boolean = false

        Returns HTMLElement

  • rollbackLinks: (vandal: any, inline?: boolean, rev?: any, page?: any) => HTMLElement
      • (vandal: any, inline?: boolean, rev?: any, page?: any): HTMLElement
      • Parameters

        • vandal: any
        • inline: boolean = false

          True to create two links in a span, false to create three links in a div (optional)

        • Optional rev: any
        • Optional page: any

        Returns HTMLElement

  • spanTag: (color: any, content: any) => HTMLSpanElement
      • (color: any, content: any): HTMLSpanElement
      • Parameters

        • color: any
        • content: any

        Returns HTMLSpanElement

moduleName

moduleName: string = 'fluff'

portletId

portletId: string

Optional ID for the portlet. This defaults to twinkle-${portletName.toLowerCase()} if unspecified

portletName

portletName: string

Name displayed on the portlet

portletTooltip

portletTooltip: string

Tooltip shown when hovering on the portlet

rollbackInPlace

rollbackInPlace: any = null

skipTalk

skipTalk: any = null

trustedBots

trustedBots: string[]

A list of usernames, usually only bots, that vandalism revert is jumped over; that is, if vandalism revert was chosen on such username, then its target is on the revision before. This is for handling quick bots that makes edits seconds after the original edit is made. This only affects vandalism rollback; for good faith rollback, it will stop, indicating a bot has no faith, and for normal rollback, it will rollback that edit.

Static moduleName

moduleName: string = 'fluff'

The name of the module, used to check if the user has the module disabled

Methods

addMenu

  • addMenu(): void

addPreference

  • addPreference(pref: any): void

disableLinks

  • disableLinks(parentNode: any): void

formatSummary

  • formatSummary(builtInString: string, userName?: string, customString?: string): string
  • Parameters

    • builtInString: string
    • Optional userName: string
    • Optional customString: string

    Returns string

makeWindow

  • makeWindow(): void

revert

  • revert(type: "vand" | "norm" | "agf", vandal: string, rev: number, page?: string): void
  • Parameters

    • type: "vand" | "norm" | "agf"
    • vandal: string
    • rev: number
    • Optional page: string

    Returns void

revertToRevision

  • revertToRevision(oldrev: any): void

Static userPreferences

Generated using TypeDoc