-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from PreMiD/master
(update stuff)
- Loading branch information
Showing
100 changed files
with
5,206 additions
and
360 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"author": { | ||
"name": "Bas950", | ||
"id": "241278257335500811" | ||
}, | ||
"service": "Bounce", | ||
"description": { | ||
"en": "Bounce Radio is a 24/7 international hit music station that provides hit music to everyone. Made by gamers for gamers.", | ||
"nl": "Bounce Radio is een 24/7 internationaal hitmuziekstation dat iedereen hitmuziek biedt. Gemaakt door gamers voor gamers." | ||
}, | ||
"url": ["wearebounce.net", "www.wearebounce.net"], | ||
"version": "1.4", | ||
"logo": "https://wearebounce.net/branding/LogoIconColour.png", | ||
"thumbnail": "https://downbeat.is-inside.me/JOEMiVbm.png", | ||
"color": "#ae3484", | ||
"tags": [ | ||
"music", | ||
"radio", | ||
"gamers" | ||
], | ||
"category": "music" | ||
} |
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,72 @@ | ||
|
||
var presence = new Presence({ | ||
clientId: "629819064642043925", | ||
mediaKeys: false | ||
}); | ||
var play, artist, track, title; | ||
var browsingStamp = Math.floor(Date.now() / 1000); | ||
let sartist, strack, slisteners, sdj; | ||
setInterval(newStats, 6000) | ||
function newStats() { | ||
let xhttp = new XMLHttpRequest(); | ||
xhttp.onreadystatechange = function() { | ||
if (this.readyState == 4 && this.status == 200) { | ||
let data = JSON.parse(this.responseText); | ||
strack = data.track; | ||
sartist = data.artist; | ||
sdj = data.dj; | ||
slisteners= data.listeners; | ||
} | ||
}; | ||
xhttp.open('GET', 'https://wearebounce.net/api/index.php?stats2=1&key=GivemeaccessBitCH!', true); | ||
xhttp.send(); | ||
|
||
} | ||
|
||
|
||
|
||
presence.on("UpdateData", () => { | ||
|
||
|
||
let presenceData = { | ||
largeImageKey: "bouncelogo" | ||
}; | ||
presenceData.startTimestamp = browsingStamp; | ||
|
||
if (document.URL.includes("#Bounce.News")) { | ||
title = document.querySelector("body > div.web > div > div > div > div > div.pageajax > div.leftnews1 > center > b:nth-child(1)"); | ||
presenceData.details = "Reading article:"; | ||
if (title.innerText.length > 128) { | ||
presenceData.state = title.innerText.substring(0, 125) + "..."; | ||
} else { | ||
presenceData.state = title.innerText; | ||
} | ||
presenceData.smallImageKey = "reading"; | ||
presence.setActivity(presenceData); | ||
} else if (document.URL.includes("#Bounce.Timetable")) { | ||
presenceData.details = "Viewing the timetable"; | ||
presence.setActivity(presenceData); | ||
} else if (document.URL.includes("#Bounce.Home")) { | ||
play = document.querySelector("body > div.web > div > div > div > div > div.player > div.stats-p > div > div.buttons > center > div > i"); | ||
play = play.className; | ||
switch (play) { | ||
case "togl fa fa-play": | ||
presenceData.smallImageKey = "pause"; | ||
presenceData.details = "Viewing the home page"; | ||
presence.setActivity(presenceData); | ||
break; | ||
case "togl fa fa-pause": | ||
presenceData.smallImageKey = "play"; | ||
presenceData.details = strack +" - "+ sartist | ||
presenceData.state = sdj +" - "+ slisteners + " listeners" | ||
presence.setActivity(presenceData) | ||
|
||
|
||
|
||
|
||
} | ||
} else { | ||
presence.setActivity(); | ||
presence.setTrayTitle(); | ||
} | ||
}); |
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
Oops, something went wrong.