Created
June 1, 2025 03:29
-
-
Save hyrious/916164320872563ffc20c0be4881d493 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
require "json" | |
require "fileutils" | |
require "cgi" | |
include FileUtils::Verbose | |
folder = 'C:\Users\hyrious\OneDrive\Apps\Violentmonkey' # <-- change to your backup folder place | |
index_file = 'Violentmonkey' | |
target = File.join __dir__, 'ViolentmonkeyExport' | |
mkdir_p target | |
a = JSON.load_file File.join folder, index_file | |
info = a['info'] | |
info.each do |part, meta| | |
filename = 'vm@2-' + CGI.unescape(part) | |
i = meta['position'] | |
data = JSON.load_file File.join folder, filename | |
File.write File.join(target, "#{i}-#{filename}.user.js"), data['code'] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment