Skip to content

Commit

Permalink
revert references from xt to x and clean up readme for pr
Browse files Browse the repository at this point in the history
cherry-picked from 24add24
  • Loading branch information
TuxedoTako committed Mar 15, 2023
1 parent 73fdf1b commit ffacbeb
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 65 deletions.
51 changes: 2 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,4 @@
# 4chan XT

**This repo is work in progress!** Use the build from the [repo this is forked from](https://github.com/ccd0/4chan-x) in the meantime.

The 4chan XT project is a migration of 4chan X from coffeescript to TypeScript/JavaScript. It is named XT both as a continuation of eXTended, and a T for TypeScript. The goals of this project is to first get a working bundle from js/ts files, and then gradually convert js files to ts and add types as needed.

## TODO

- find alternative for `<% if (`
- [x] made html templates jsx/txt functions
- this uses the typescript compiler to compile the jsx
- render code is in [src/globals/jsx.ts](./src/globals/jsx.ts)
- [x] binary files are included as base64 in the bundle step, they do need explicit imports
- [ ] \<% if (readJSON('/.tests_enabled')) { %\>, are these still used?
- build script
- [x] userscript
- [ ] .crx extension
- [x] crx directory that can be loaded as an unpacked extension is created
- [x] beta
- [x] noupdate
- [ ] run and debug
- [ ] port updates made to 4chan-X made since this was forked

## Other notes

- A lot of files have circular dependencies, but rollup can handle that
- but for some scripts that add to the same object I had to merge them, like Posting/QR and site/SW.yotsuba.js
- sometimes something might not be initialized before use, for example, `$.dict()` and `$.SECONDS`
- I moved these to a new file called helpers.ts, which shouldn't have dependencies itself, so it's also available
- tsconfig.json has `"checkJs": true,`, and a lot of js files report type errors when opened because of unknown properties on objects and reassigning variables with different types. These errors don't block the bundle at this moment.
- old files in the builds directory stay as reference until the new builds are functional, new files go in the builds/test directory
- old build scripts are also kept around for reference until the new build output is fully functional
- the es 2020 target was choses for optional chaining
- @violentmonkey/types was chosen over @types/greasemonkey because @types/greasemonkey only declares the GM object, and not GM\_ functions
- I don't really understand PostClone, so that might have bugs after migration

## Recommendations

- Visual studio code
- Format on save using default formatter
- extensions
- streetsidesoftware.code-spell-checker
- EditorConfig.EditorConfig

---

Original readme:

![screenshot](./img/screenshot.png)
![screenshot](https://ccd0.github.io/4chan-x/img/screenshot.png)
# 4chan X
4chan X is a script that adds various features to anonymous imageboards. It was originally developed for 4chan but has no affiliation with it.

Expand Down Expand Up @@ -138,3 +90,4 @@ If you encounter a bug, try the steps [here](https://github.com/ccd0/4chan-x/blo
- [Frequently Asked Questions](https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions)
- [Report Bugs](https://github.com/ccd0/4chan-x/issues)
- [Contributing](https://github.com/ccd0/4chan-x/blob/master/CONTRIBUTING.md)

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"name": "4chan-XT",
"description": "4chan XT is a script that adds various features to anonymous imageboards.",
"name": "4chan-X",
"description": "4chan X is a script that adds various features to anonymous imageboards.",
"meta": {
"name": "4chan XT",
"path": "4chan-XT",
"fork": "TuxedoTako",
"page": "https://github.com/TuxedoTako/4chan-xt",
"downloads": "https://github.com/TuxedoTako/4chan-xt/releases",
"name": "4chan X",
"path": "4chan-x",
"fork": "ccd0",
"page": "https://www.4chan-x.net/",
"downloads": "https://www.4chan-x.net/builds/",
"oldVersions": "https://raw.githubusercontent.com/ccd0/4chan-x/",
"faq": "https://github.com/TuxedoTako/wiki/Frequently-Asked-Questions",
"captchaFAQ": "https://github.com/TuxedoTako/wiki/Captcha-FAQ",
"cssGuide": "https://github.com/TuxedoTako/wiki/Styling-Guide",
"license": "https://github.com/TuxedoTako/blob/master/LICENSE",
"changelog": "https://github.com/TuxedoTako/blob/master/CHANGELOG.md",
"issues": "https://github.com/TuxedoTako/issues",
"newIssue": "https://github.com/TuxedoTako/issues",
"faq": "https://github.com/ccd0/4chan-x/wiki/Frequently-Asked-Questions",
"captchaFAQ": "https://github.com/ccd0/4chan-x/wiki/Captcha-FAQ",
"cssGuide": "https://github.com/ccd0/4chan-x/wiki/Styling-Guide",
"license": "https://github.com/ccd0/4chan-x/blob/master/LICENSE",
"changelog": "https://github.com/ccd0/4chan-x/blob/master/CHANGELOG.md",
"issues": "https://github.com/ccd0/4chan-x/issues",
"newIssue": "https://github.com/ccd0/4chan-x/issues",
"newIssueMaxLength": 8181,
"alternatives": "https://www.4chan-x.net/4chan_alternatives.html",
"appid": "lacclbnghgdicfifcamcmcnilckjamag",
Expand Down

0 comments on commit ffacbeb

Please sign in to comment.