-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
10 changed files
with
1,937 additions
and
128 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 21 | ||
|
||
- name: Install dependencies | ||
run: yarn install | ||
|
||
- name: Build | ||
run: yarn build | ||
|
||
- name: Upload files to a GitHub release | ||
uses: svenstaro/upload-release-action@2.9.0 | ||
with: | ||
file: dist/NitroStreams.plugin.js |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
node_modules/ | ||
NitroStreams.plugin.js | ||
yarn.lock | ||
dist/ | ||
yarn-error.log |
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,20 @@ | ||
{ | ||
"scripts": { | ||
"build": "babel NitroStreams.jsx -o NitroStreams.plugin.js && terser NitroStreams.plugin.js -o NitroStreams.min.plugin.js" | ||
"name": "nitrostreams", | ||
"version": "1.1.0", | ||
"description": "Enables Nitro streams in Discord", | ||
"author": { | ||
"name": "Daniel", | ||
"email": "D4n13l3k00@yandex.ru" | ||
}, | ||
"type": "module", | ||
"devDependencies": { | ||
"@babel/cli": "^7.17.6", | ||
"@babel/core": "^7.17.9", | ||
"@babel/plugin-transform-react-jsx": "^7.17.3", | ||
"babel-loader": "^8.2.4", | ||
"react": "^18.0.0", | ||
"react-dom": "^18.0.0", | ||
"terser": "^5.12.1" | ||
"terser": "^5.12.1", | ||
"vite": "^5.1.5", | ||
"vite-plugin-singlefile": "^2.0.1" | ||
}, | ||
"scripts": { | ||
"build": "vite build --mode production", | ||
"dev-watch": "vite build --mode development --watch", | ||
"dev": "vite build --mode development" | ||
} | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "NitroStreams", | ||
"version": "1.1.0", | ||
"description": "Acticvation of Nitro Streams", | ||
|
||
"author": "D4n13l3k00", | ||
"website": "https://t.me/D4n13l3k00" | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,95 +1,104 @@ | ||
/**! | ||
* @name NitroStreams | ||
* @version 1.0.0 | ||
* @description Acticvation of Nitro Streams | ||
* @author D4n13l3k00 | ||
* | ||
* @website https://t.me/D4n13l3k00 | ||
*/ | ||
|
||
module.exports = class NitroStreams { | ||
showInfo() { | ||
BdApi.alert( | ||
"NitroStreams", | ||
<div | ||
style={{ | ||
display: "flex", | ||
flexDirection: "column", | ||
alignItems: "center", | ||
justifyContent: "center", | ||
textAlign: "center", | ||
fontSize: "14px", | ||
fontWeight: "500", | ||
color: "var(--interactive-normal)", | ||
lineHeight: "16px", | ||
textTransform: "uppercase", | ||
marginTop: "10px", | ||
marginBottom: "5px", | ||
}} | ||
> | ||
<img | ||
src="https://discord.com/assets/ff5b4f3466b1e217ba845ce0540da563.png" | ||
alt="" | ||
style={{ width: "100%" }} | ||
/> | ||
<h6 | ||
style={{ | ||
marginTop: "10px", | ||
marginBottom: "5px", | ||
}} | ||
> | ||
Made with ❤ by D4n13l3k00 | ||
</h6> | ||
</div> | ||
); | ||
} | ||
|
||
load() { | ||
if (BdApi.loadData("NitroStreams", "loaded") !== true) { | ||
this.showInfo(); | ||
BdApi.saveData("NitroStreams", "loaded", true); | ||
} | ||
} | ||
|
||
caption() { | ||
let qualitySettingsContainer = document.querySelector( | ||
"div[class^='qualitySettingsContainer']" | ||
); | ||
let caption = document.getElementsByClassName("NitroStreams-caption"); | ||
if (qualitySettingsContainer !== null && caption.length === 0) { | ||
let _h6 = ( | ||
<h6 | ||
style={{ | ||
marginTop: "10px", | ||
marginBottom: "5px", | ||
fontSize: "14px", | ||
fontWeight: "500", | ||
color: "var(--interactive-normal)", | ||
lineHeight: "16px", | ||
textTransform: "uppercase", | ||
textAlign: "center", | ||
}} | ||
className="NitroStreams-caption" | ||
> | ||
Made with ❤ by D4n13l3k00 | ||
</h6> | ||
); | ||
const output = document.createElement("div"); | ||
BdApi.ReactDOM.render(_h6, output); | ||
qualitySettingsContainer.appendChild(output); | ||
} | ||
} | ||
|
||
start() { | ||
this.old_account_type = | ||
BdApi.findModuleByProps("getCurrentUser").getCurrentUser().premiumType; | ||
this.interval = setInterval(this.caption, 10); | ||
BdApi.findModuleByProps("getCurrentUser").getCurrentUser().premiumType = 2; | ||
} | ||
|
||
stop() { | ||
clearInterval(this.interval); | ||
BdApi.findModuleByProps("getCurrentUser").getCurrentUser().premiumType = | ||
this.old_account_type; | ||
} | ||
}; | ||
/**! | ||
* @name NitroStreams | ||
* @version 1.0.0 | ||
* @description Acticvation of Nitro Streams | ||
* @author D4n13l3k00 | ||
* | ||
* @website https://t.me/D4n13l3k00 | ||
*/ | ||
|
||
module.exports = class NitroStreams { | ||
uiInjectInterval = null; | ||
nitroInterval = null; | ||
|
||
showInfo() { | ||
BdApi.alert( | ||
"NitroStreams", | ||
<div | ||
style={{ | ||
display: "flex", | ||
flexDirection: "column", | ||
alignItems: "center", | ||
justifyContent: "center", | ||
textAlign: "center", | ||
fontSize: "14px", | ||
fontWeight: "500", | ||
color: "var(--interactive-normal)", | ||
lineHeight: "16px", | ||
textTransform: "uppercase", | ||
marginTop: "10px", | ||
marginBottom: "5px", | ||
}} | ||
> | ||
<img | ||
src="https://discord.com/assets/ff5b4f3466b1e217ba845ce0540da563.png" | ||
alt="" | ||
style={{ width: "100%" }} | ||
/> | ||
<h6 | ||
style={{ | ||
marginTop: "10px", | ||
marginBottom: "5px", | ||
}} | ||
> | ||
Made with ❤ by D4n13l3k00 | ||
</h6> | ||
</div> | ||
); | ||
} | ||
|
||
load() { | ||
if (BdApi.loadData("NitroStreams", "loaded") !== true) { | ||
this.showInfo(); | ||
BdApi.saveData("NitroStreams", "loaded", true); | ||
} | ||
} | ||
|
||
caption() { | ||
let qualitySettingsContainer = document.querySelector( | ||
"div[class^='qualitySettingsContainer']" | ||
); | ||
let caption = document.getElementsByClassName("NitroStreams-caption"); | ||
if (qualitySettingsContainer !== null && caption.length === 0) { | ||
let _h6 = ( | ||
<h6 | ||
style={{ | ||
marginTop: "10px", | ||
marginBottom: "5px", | ||
fontSize: "14px", | ||
fontWeight: "500", | ||
color: "var(--interactive-normal)", | ||
lineHeight: "16px", | ||
textTransform: "uppercase", | ||
textAlign: "center", | ||
}} | ||
className="NitroStreams-caption" | ||
> | ||
Made with ❤ by D4n13l3k00 | ||
</h6> | ||
); | ||
const output = document.createElement("div"); | ||
BdApi.ReactDOM.render(_h6, output); | ||
qualitySettingsContainer.appendChild(output); | ||
} | ||
} | ||
|
||
setNitro() { | ||
BdApi.findModuleByProps("getCurrentUser").getCurrentUser().premiumType = 2; | ||
} | ||
|
||
start() { | ||
this.old_account_type = | ||
BdApi.findModuleByProps("getCurrentUser").getCurrentUser().premiumType; | ||
this.uiInjectInterval = setInterval(this.caption, 500); | ||
this.setNitro(); | ||
this.nitroInterval = setInterval(this.setNitro, 5000); | ||
} | ||
|
||
stop() { | ||
clearInterval(this.uiInjectInterval); | ||
clearInterval(this.nitroInterval); | ||
BdApi.findModuleByProps("getCurrentUser").getCurrentUser().premiumType = | ||
this.old_account_type; | ||
} | ||
}; |
Oops, something went wrong.