Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undiscord 5.1 #455

Merged
merged 75 commits into from
Mar 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
8a0c19f
fix import of json file
Flo4604 Oct 9, 2022
1848916
fix end not being defined and linter errors
Flo4604 Oct 9, 2022
4726b7e
fix rollup and eslint errors
Flo4604 Dec 3, 2022
0f4848f
add GM_get/set Value and a auto confirm button
Flo4604 Dec 3, 2022
ec39adc
Major refactor, wip
victornpb Feb 20, 2023
54834a4
move helpers and log to own separate files
victornpb Feb 21, 2023
86f4e4a
generate dev version number
victornpb Feb 21, 2023
e59312a
moving local variables to o instance properties, separated logic into…
victornpb Feb 21, 2023
8c662a1
refactoring stuff to work with new oop object, grouped global variabl…
victornpb Feb 21, 2023
4bf4f21
removed unused packages
victornpb Feb 21, 2023
978fcf8
Added dev server for local testing
victornpb Feb 21, 2023
7ce5de2
stats also print rate limits
victornpb Feb 22, 2023
20da222
fixed confirm
victornpb Feb 22, 2023
f173946
fixed filter pinned
victornpb Feb 22, 2023
f1ff3cb
implemented retry
victornpb Feb 22, 2023
3d38698
end condition and refactored a few references
victornpb Feb 22, 2023
b4dba21
change printLog to use classes instead of inline styles, should be mo…
victornpb Feb 22, 2023
7a7fb4f
dev update url
victornpb Feb 22, 2023
54ca7c6
improved contributing instructions
victornpb Feb 22, 2023
c959cea
New improved redact, CSS only with no aditional markup
victornpb Feb 22, 2023
7cae39c
more compact deleting log
victornpb Feb 22, 2023
a76eac9
wrong variable names
victornpb Feb 22, 2023
3b19830
onProgress handler
victornpb Feb 22, 2023
c6f5c89
added status bar, and css resize handler
victornpb Feb 22, 2023
e76d250
minor adjustments
victornpb Feb 23, 2023
4328a46
renamed file
victornpb Feb 23, 2023
139e7ac
fix attempts
victornpb Feb 23, 2023
7ac1c37
changed delay inputs to sliders that are synced live
victornpb Feb 25, 2023
9e54664
Implement multichannel delete sequence
victornpb Feb 25, 2023
d6440fc
adding multi channel support
victornpb Feb 25, 2023
2ebddb4
renamed file
victornpb Feb 25, 2023
fb1bfb5
renamed file
victornpb Feb 25, 2023
dc20215
added entrypoint
victornpb Feb 25, 2023
459ccd5
make max attempt an option
victornpb Feb 25, 2023
be41d1b
comments
victornpb Feb 25, 2023
6c8352e
implemented muti channel batch queue
victornpb Feb 25, 2023
05ae9ed
preparing to import feature
victornpb Feb 26, 2023
9d63f66
change minimum node version
victornpb Feb 27, 2023
20f513c
include the dev version inside the bundle using rollup-plugin-bake-env
victornpb Feb 27, 2023
78ff053
generate inline source map while debugging, and no source map in the …
victornpb Feb 27, 2023
18a0728
updated packages and removed unused
victornpb Feb 27, 2023
e525d6f
updaated to rollup 3
victornpb Feb 27, 2023
0aee87f
Added video instructions
victornpb Feb 27, 2023
ae9e393
fixed local IP
victornpb Feb 27, 2023
bb171b2
package json removed unnecessary stuff
victornpb Mar 4, 2023
ec3634d
Merge branch 'pr/421' into next
victornpb Mar 4, 2023
9ff5547
refactored code from contribution
victornpb Mar 4, 2023
71716f5
fix not auto incrementing dev version on save
victornpb Mar 4, 2023
f92d641
add description
victornpb Mar 4, 2023
e633a45
fix confirm (cancel) not breaking out of a job
victornpb Mar 4, 2023
062ad01
clear log
victornpb Mar 4, 2023
a9f9189
dev build
victornpb Mar 4, 2023
769674e
add contributing link
victornpb Mar 4, 2023
1e418e9
add a do not change version warning
victornpb Mar 4, 2023
42762c9
remove unecessary file
victornpb Mar 4, 2023
12f0b5a
organized css
victornpb Mar 4, 2023
043ec1d
changed printLog to log
victornpb Mar 4, 2023
40e3888
added button to toggle the sidebar
victornpb Mar 4, 2023
e064585
Changed appearance of the start button
victornpb Mar 4, 2023
f08298d
Added icon
victornpb Mar 5, 2023
5395c6a
update stuff on dev server
victornpb Mar 5, 2023
485d65d
fixed progress bar
victornpb Mar 5, 2023
d7fcd7a
wipe archive (import json) feature fixed
victornpb Mar 5, 2023
769846f
removed unnecessary button
victornpb Mar 5, 2023
ffcf9cc
only accept json files on the input
victornpb Mar 5, 2023
7600805
renamed Import json to wipe archive, and UI tidy up
victornpb Mar 5, 2023
0d682b4
change color of button when running, more visible button progress bar
victornpb Mar 5, 2023
ccbde8e
more error handling
victornpb Mar 5, 2023
96754a1
tidy up log
victornpb Mar 5, 2023
d7e720c
security: added noopener noreferrer to all external links
victornpb Mar 5, 2023
54b3928
shut up code quality over constant
victornpb Mar 5, 2023
e14cd1b
log spacing
victornpb Mar 5, 2023
19c01ed
Compacted CSS to reduce script length.
victornpb Mar 5, 2023
fe19e7d
added title on buttons, hide progress on startup
victornpb Mar 5, 2023
028ca33
v5.0.1
victornpb Mar 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 48 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,55 @@
# Contributing

Please do not make changes to the .js files at the root directory!
Only make changes to the change the files inside the `src/` folder, otherwise I can't merge your changes back to the project.
# Before making any changes
## Do not edit files at top

If you're unfamilliar with compiled Javascript:
Please do not make changes to the `.js` files in the top directory!
Only make changes to the files inside the `src/` folder, otherwise I can't merge your changes back to the project.

Also, do not commit changes to the `deleteDiscordMessages.user.js` file!

Do not alter the version, because I may have to change this depending on the order of things that get merged into main. So please leave it as is to avoid conflicts.

## Oddities about this project

> This is NOT your typical javascript App, so this project has a few oddities:

- Do NOT add external dependencies or libraries.
The only allowed dependencies are related things that run during build and testing.
The script itself should't import or load anything external.
The reason for this is security, if the user has to audit external packages we're doomed.

- Do NOT use Prettier.
This project has to stay fairly short in order to be auditable in a short amount of time.
For that reason some parts of the code favor compactness instead of consistency of indentation.


-------------------------------------------------------------------------------

# Building the project
# Now that you read that, this is what you do

#### Click to watch video (45 seconds):
[![Video Instructions](https://img.youtube.com/vi/AKTCvzvcPig/0.jpg)](https://www.youtube.com/watch?v=AKTCvzvcPig)
https://www.youtube.com/watch?v=AKTCvzvcPig


If you're unfamilliar with compiled Javascript, this is how you do it:

1. Clone the repository to your computer
2. Open the terminal inside the cloned directory
3. Run `npm i` to download the project dependencies
4. Run `npm start` it will automatically compile the project, when you make changes

## Testing locally

Open the URL that shows up in your console when you run `npm start` it will ask you to install a development version of Undiscord.
You need to click the update button every time you make changes in TamperMonkey, or reinstall it by opening the URL again.

You can alternatively test manually:

Copy the contents of the `deleteDiscordMessages.user.js` at the top of the repository,
and paste it directly into your browser console.

----------------------------------------------------------------

2 changes: 2 additions & 0 deletions readme.md → README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ Is prefered that _issues_ follow a certain format. If you're not familiar with b

If you believe you found a bug please file an [issue](https://github.com/victornpb/undiscord/issues), but please fill the issue template.

If you are looking to contribute please read the [CONTRIBUTING](./CONTRIBUTING.md) first.

### Copy paste version
Looking for the old Copy/Paste version? [here](https://github.com/victornpb/undiscord/wiki/Copy-paste-method)

Expand Down
20 changes: 13 additions & 7 deletions build/metadata.js → build/metadata.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// const pkg = require('../package.json');
import pkg from '../package.json';
import fs from 'fs';
const loadJSON = (path) => JSON.parse(fs.readFileSync(new URL(path, import.meta.url)));


//
// Generate metadata block with information from package.json
Expand All @@ -25,11 +26,13 @@ function generateComment(manifest) {
].join('\n');
}

export default () => {
export default function userScriptMetadataBlock() {
const pkg = loadJSON('../package.json');

const metadata = {
name: pkg.nameFull,
description: pkg.description,
version: pkg.version,
version: process.env.VERSION,
author: pkg.author,
homepageURL: pkg.homepage,
supportURL: pkg.bugs.url,
Expand All @@ -39,12 +42,15 @@ export default () => {
};

if (!production) {
metadata.name = metadata.name + ' [DEV]';
metadata.namespace = metadata.namespace + '_DEV';

delete metadata.downloadURL;
delete metadata.updateURL;
delete metadata.homepageURL;
metadata.version = new Date().toISOString();
// metadata.namespace = 'foobar';

metadata.downloadURL = metadata.updateURL = metadata.homepageURL = 'http://localhost:10001/deleteDiscordMessages.user.js';
}

return generateComment(metadata);
};
}
3 changes: 2 additions & 1 deletion build/strings-plugin.js → build/strings-plugin.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { createFilter } = require('rollup-pluginutils');
import { createFilter } from 'rollup-pluginutils';

export function string(opts = {}) {
if (!opts.include) {
Expand All @@ -12,6 +12,7 @@ export function string(opts = {}) {

transform(code, id) {
if (filter(id)) {
if (opts.transform) code = opts.transform(code, id, opts);
return {
code: 'export default (`\n'+ code + '\n`);',
map: { mappings: '' }
Expand Down
Loading