mirror of
https://github.com/lordfriky/web-cfw-loader.git
synced 2024-12-27 07:31:56 +00:00
e6357d48b2
* Update README
* Delete unneeded file
* Update language stuff
* Update disclaimer (1/2)
* Update disclaimer (2/2)
It still need to be updated on some languages, but that's all I could do for now :b
* Oops
I forgot to include this in the last commit :b
* Update README
I think you should include all the colaborators in the readme as well, not only Elijah
Btw, I'm arranging them in the order in which the languages are shown (excluding Thomleg :b)
* Clearing all Thomleg traces...
* Remove Briccmii
C'mon, was it even necessary to include it in the first place? Hekate can also install AutoRCM by itself...
* Put payloads in individual files
* Add fusee-primary for Atmosphère 0.8.3
* Add proper contribuiting instructions
Plz, improve my grammar on the CONTRIBUITING file, english is hard >.<
* 🤦 x2, maintaing
English is hard x2
* Bump version to 1.4
Because, why not? :b
4.3 KiB
4.3 KiB
Contributing
Adding a new translation
- Fork this repo in your GitHub account.
- Clone your fork into your computer.
- Make a copy of
en-US.js
(you can find it inside thei18n
folder) and start translating all the strings to your language using your favorite text editor. - When you finish, save it with your locale as name (e.g.
fr-FR.js
if you are working on a french translation) inside that folder. - Open the
i18n.js
file. - Look for
else langObj = enUS;
and add your locale in this format right before it:
else if (lang === "your-locale")
langObj = yourLocale;
- Finally open
index.html
and look for this line:
<script src="./i18n.js"></script>
- Add a reference to your file before the previous line in this format:
<script src="./i18n/your-locale.js"></script>
- Now you're done, upload your changes to your fork in GitHub and make a pull request.
Updating/Adding a payload
- Fork this repo in your GitHub account.
- Clone your fork into your computer.
- Create a
.js
file inside thepayloads
folder with the name of the payload (if you are adding one). - Open that file with your favorite text editor.
- (Optional) Add these lines at the beggining of the file, or update them if you are updating the payload, just for cosmetic purposes:
// Payload Name and Version
// Sourced from https://www.example.com/link/to/your/payload.bin
- Add the line
const your_payload_name = new Uint8Array([
to the file (if you are creating it). - Go to web-cfw-loader, select Upload payload, open your updated/new payload and check Get payload byte array (don't sploit).
- Press Deliver Payload! and copy the byte array from the log (the entire text after
Logging payload bytes...
). - Paste the byte array right after
Uint8Array([
. - Delete
,
at the end of the array and append]);
. - Save the file.
If you are updating a payload
- Open
index.html
and look for the payload option. - Bump its version to the corresponding one.
- Open every of the language files (the
.js
files from thei18n
folder), look for the payload string and bump its version number too. - Finally, upload your changes to your fork in GitHub and make a pull request.
If you are adding a payload
- Open
main.js
and look for the string} else if (payloadType === "uploaded") {
. - Add the new payload right before it using this format:
} else if (payloadType === "your_payload_name") {
payload = your_payload_name;
- Save the file and open
index.html
. - Look for the string
<option value="uploaded" id="optionUpload" >Upload payload</option>
and add the new an option for the new payload using this format:
<option value="your_payload_name" id="optionTheNewPayload" >The New Payload Name And Its Version</option>
- On the same file, go down to
<script src="./main.js"></script>
and add the path to the payload right before it using this format:
<script src="./payloads/payloadname.js"></script>
- Save it, open
i18n.js
and look for this stringdocument.getElementById("optionUpload").innerHTML = langObj.optionUpload;
- Again, append the payload option id to the previous line using this format:
document.getElementById("optionFusee").innerHTML = langObj.optionFusee;
- Finally, open every of the language files (the
.js
files inside thei18n
folder) and add the payload to them using this format (you already know where):
"optionTheNewPayload" : "The New Payload Name And Its Version",
- Congrats, you did it! Now, upload your changes to your fork in GitHub and make a pull request.
Extra: Test your changes before making a pull request
If you want to confirm that your changes work before suggesting them follow these steps:
- Make sure all your changes are successfully uploaded to your fork in GitHub.
- Go to your repo settings.
- Go down to GitHub Pages and select master branch in Source.
- Click Save and wait a few seconds.
- Now, you should see your site at https://YourGitHubUsername.github.io/web-cfw-loader/.
- If everything is alright, now is the time to make a pull request.