Change Deviantart "sort by" option back to newest

This replaces the default "/gallery" URL with "/gallery/all?order=newest" in order to make newest sort default for a user's gallery page. You must click on the "all" gallery, or manually refresh the page to activate. This just a quick patch because I don't know JS.

Verze ze dne 16. 11. 2025. Zobrazit nejnovější verzi.

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         Change Deviantart "sort by" option back to newest
// @namespace    https://www.deviantart.com
// @version      2025-11-16
// @description  This replaces the default "/gallery" URL with "/gallery/all?order=newest" in order to make newest sort default for a user's gallery page. You must click on the "all" gallery, or manually refresh the page to activate. This just a quick patch because I don't know JS.
// @author       Michael Washboard
// @match        https://www.deviantart.com/*gallery
// @match        https://www.deviantart.com/*gallery/all
// @icon         https://st.deviantart.net/eclipse/icons/favicon-v2-16x16.png
// @grant        none
// @license MIT
// ==/UserScript==
const { href } = window.location;
if (href.slice(-1) == 'l') {
  window.location.replace(href + '?order=newest')
} else if (href.slice(-1) !== '/all?order=newest') {
  window.location.replace(href + '/all?order=newest');
}