Created
September 7, 2021 15:29
-
-
Save oasisfeng/a3cd5b54a0dcc14a046e0b59d585fc86 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Baidu Netdisk Mobile Tweaks | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Some tweaks to Baidu Netdisk Mobile Web. | |
// @author Oasis Feng | |
// @match https://pan.baidu.com/disk/home* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
(function(open) { | |
XMLHttpRequest.prototype.open = function() { | |
if (arguments.length > 1 && arguments[1].startsWith('/api/list?')) // Sort by name | |
arguments[1] = arguments[1].replace('desc=1', 'desc=0').replace('order=time', 'order=name') | |
open.apply(this, arguments); | |
}; | |
})(XMLHttpRequest.prototype.open); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment