Skip to content

Justin-Byrne/DeviantIO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

DeviantIO

issues license

Additional functionality for Deviant Art

Hotkeys

PORTRAIT
(Favourite)

REDIRECT
Home

⬇️

Next

WATCH
User

➑️

Next

⬅️

Next

PORTRAIT
Previous

PORTRAIT
Next

➑️

Previous

REDIRECT
Random
URL

⬅️

Next

PORTRAIT
Expand

⬆️

Next

⬆️

Next

⬆️

Next

REDIRECT
User
Gallery

Installation

Migrate to your desired download location, and download this repository to your system using git clone:

git clone https://github.com/Justin-Byrne/DeviantIO.git

Injection

Console

Open your browser's console...

OS Chrome, FireFox, & Edge
Win Ctrl + Shift + J
Mac Cmd + Option + J

Paste (either) DeviantIO.js or DeviantIO-min.js within your browser's console, and hit enter

Extension

Download a JavaScript injection extension for your browser, and paste DeviantIO.js or DeviantIO-min.js

Gist

There's always a live gist for this project, in case you want to import this script that way.

<script src="https://gist.github.com/Justin-Byrne/5aa9b9f2d2d3567632979e48126900b1.js"></script>

Usage

Input

Input Task Mode
a, ← Previous Portrait Portrait
d, β†’ Next Portrait Portrait
w, ↑ Back to Home or Profile Portrait
q, Space, Enter Add Portrait to Favorites Portrait
e, Shift Add Deviant User to Watch List Portrait
z, Alt Toggle Portrait Expanse Mode Portrait
c, /, Command Open Artist's Gallery in New Tab Portrait
s, ↓ Redirect to randomized URL in config Gallery
Note: Hotkeys are assignable under _config.input_hotkeys
let _config =
{
    input_hotkeys:
    {
        previous:  [ "a", "left"           ],       // [Portrait Mode] : Hotkey(s) to go to the previous portrait
        next:      [ "d", "right"          ],       // [Portrait Mode] : Hotkey(s) to go to the next portrait
        home:      [ "w", "up"             ],       // [Portrait Mode] : Hotkey(s) to go to the main gallery page
        favourite: [ "q", "space", "enter" ],       // [Portrait Mode] : Hotkey(s) to add picture to favourites
        watch:     [ "e", "shift"          ],       // [Portrait Mode] : Hotkey(s) to add user to watch list
        expand:    [ "z", "alt"            ],       // [Portrait Mode] : Hotkey(s) to toggle portrait expanse mode
        user:      [ "c", "/",   "command" ],       // [Portrait Mode] : Hotkey(s) to open current artist's gallery
        redirect:  [ "s", "down"           ]        //     [All Modes] : Hotkey(s) to open a new window with a random redirect; @see _config.redirect_urls
    },
    ...
}

Feature Flags

Feature Description Default
Favourite to Next Favouriting portrait will also cycle to the next portrait true
Show Notification Favourite Shows favourite notifications true
Show Notification Favourite Stage Shows favourite notification stage background as accent_colour true
Show Notification Watch Shows watch notifications true
Show Status Favourite Shows favourite status of favourited portraits true
Skip Favourite Skips already favourited portraits false
Skip Watch Skips portraits that you are not already watching false
Skip Tier Skips tier programs while cycling through portraits true
Note: Feature flags are assignable under _config.feature_flags
let _config =
{
    ... ,
    feature_flags:
    {
        favourite_to_next:                  true,   // [Portrait Mode] : Favouriting portrait will also cycle to the next portrait
        show_notification_favourite:        true,   // [Portrait Mode] : Shows favourite notifications
        show_notification_favourite_stage:  true,   // [Portrait Mode] : Shows favourite notification stage background as accent_colour: @see _config.internal_data.accent_colour
        show_notification_watch:            true,   // [Portrait Mode] : Shows watch notifications
        show_status_favourite:              true,   //  [Gallery Mode] : Shows favourite status of favourited portraits
        skip_favourite:                     false,  // [Portrait Mode] : Skips already favourited portraits
        skip_watch:                         false,  // [Portrait Mode] : Skips portraits that you are not already watching
        skip_tier:                          true,   // [Portrait Mode] : Skips tier programs while cycling through portraits
    },
    ...
}

General Configuration

Configuration settings are accessible through the _config object

You can view the current configurations through DeviantIO.config; via the console log

Name Type Description
config Object Main configurations object
config.input_hotkeys Object Hotkey(s) associated with each keyboard task
config.feature_flags Object Various flags for features
config.redirect_urls Array Redirect URLs
config.internal_data Object General abstract data for program
Note: _config object expanded
/**
 * Main configuration settings
 * @private
 * @constant        {Object} _config                                        Main configurations object
 * @param           {Object} _config.input_hotkeys                          Hotkey(s) associated with each keyboard task; @see _keyboard_tasks
 * @param           {Object} _config.feature_flags                          Various flags for features
 * @param           {Array}  _config.redirect_urls                          Redirect URLs
 * @param           {Object} _config.internal_data                          General abstract data for program
 */
let _config =
{
    input_hotkeys:
    {
        previous:  [ "a", "left"           ],       // [Portrait Mode] : Hotkey(s) to go to the previous portrait
        next:      [ "d", "right"          ],       // [Portrait Mode] : Hotkey(s) to go to the next portrait
        home:      [ "w", "up"             ],       // [Portrait Mode] : Hotkey(s) to go to the main gallery page
        favourite: [ "q", "space", "enter" ],       // [Portrait Mode] : Hotkey(s) to add picture to favourites
        watch:     [ "e", "shift"          ],       // [Portrait Mode] : Hotkey(s) to add user to watch list
        expand:    [ "z", "alt"            ],       // [Portrait Mode] : Hotkey(s) to toggle portrait expanse mode
        user:      [ "c", "/",   "command" ],       // [Portrait Mode] : Hotkey(s) to open current artist's gallery
        redirect:  [ "r", "down"           ]        //     [All Modes] : Hotkey(s) to open a new window with a random redirect; @see _config.redirect_urls
    },
    feature_flags:
    {
        favourite_to_next:                  true,   // [Portrait Mode] : Favouriting portrait will also cycle to the next portrait
        show_notification_favourite:        true,   // [Portrait Mode] : Shows favourite notifications
        show_notification_favourite_stage:  true,   // [Portrait Mode] : Shows favourite notification stage background as accent_colour: @see _config.internal_data.accent_colour
        show_notification_watch:            true,   // [Portrait Mode] : Shows watch notifications
        show_status_favourite:              true,   //  [Gallery Mode] : Shows favourite status of favourited portraits
        skip_favourite:                     false,  // [Portrait Mode] : Skips already favourited portraits
        skip_watch:                         false,  // [Portrait Mode] : Skips portraits that you are not already watching
        skip_tier:                          true,   // [Portrait Mode] : Skips tier programs while cycling through portraits
    },
    redirect_urls:
    [
        "https://google.com",
        "https://gmail.com",
        "https://github.com",
        "https://trello.com"
    ],
    internal_data:
    {
        accent_colour: 'rgba(118, 228, 177, 1)',            // Favourited accent colour
        time_interval: 500,                                 // How often to update this script
        url_reference: undefined,                           // Present Deviant Art URL; defined at runtime
        deviantarturl: 'https://www.deviantart.com',        // Base Deviant Art URL
        mousetrap_cdn: '//cdnjs.cloudflare.com/ajax/libs/mousetrap/1.4.6/mousetrap.min.js',         // Mousetrap CDN address
        ui_data_hooks:
        {
            watch:     "[data-hook='user_watch_button']",   // Data hook for watch button
            favourite: "[data-hook='fave_button']",         // Data hook for favourite button
            stage:     "[data-hook='art_stage']",           // Data hook for background art stage of Portraits
            thumbs:    "[data-hook='deviation_std_thumb']", // Data hook for Portrait thumbnails
            user:      "[data-hook='user_link']",           // Data hook for user link
            action:    "[data-hook='action_bar']",          // Data hook for action bar
            meta:      "[data-hook='deviation_meta']"       // Data hook for deviation meta data
        },
        picture_rules:
        {
            off:                                            // Rules for non-favourited elements
            {
                border:    'none',
                boxShadow: 'none',
                opacity:    1
            },
            on:                                             // Rules for favourited elements
            {
                border:    `2px solid %ACCENT_COLOUR%`,
                boxShadow: `0px 0px 5px 2px %ACCENT_COLOUR%`,
                opacity:    0.5
            }
        }
    }
}

Documentation

πŸ“– JSDoc

Support

Please open an issue for support.

Structure

.
β”œβ”€β”€ build
β”‚Β Β  β”œβ”€β”€ compile.sh
β”‚Β Β  └── watch.sh
β”œβ”€β”€ docs
β”‚Β Β  β”œβ”€β”€ CHANGELOG.md
β”‚Β Β  β”œβ”€β”€ FUNDING.yml
β”‚Β Β  └── JSDoc.md
β”œβ”€β”€ script
β”‚Β Β  β”œβ”€β”€ DeviantIO-min.js
β”‚Β Β  └── DeviantIO.js
β”œβ”€β”€ LICENSE
└── README.md

Copyright

Byrne-Systems

= Byrne-Systems Β© 2023 - All rights reserved. =