- 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.
- 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.
- 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.
- 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.
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.