Skip to content

Commit

Permalink
1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
GerlachM committed Aug 18, 2022
1 parent 30ebbd7 commit 2b4b3bc
Show file tree
Hide file tree
Showing 15 changed files with 1,839 additions and 0 deletions.
612 changes: 612 additions & 0 deletions background.js

Large diffs are not rendered by default.

Binary file added images/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions images/loading.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!DOCTYPE html>
<html>
<head>
<title></title>
<style>
html, body {

}
</style>
<script>
var ExtensionID = "";
var twitchToken = "none";

function messageExtention() {
chrome.runtime.sendMessage(ExtensionID, {requestType: "setTtvToken", ttvToken: getHashParameters("access_token")},
function(response) {
if (response.status == "success") {
document.getElementById("mainMessage").innerHTML = "Logged in successfully! You can close this tab now.";
} else {
document.getElementById("mainMessage").innerText = "An issue occured!<br />(" + response.status + ")";
}
})
}

function getHashParameters(hashname) {
var hashParams = new Map();

window.location.hash.substr(1).split('&').forEach(function(element) {
let newElem = element.split('=');
hashParams.set(newElem[0], newElem[1]);
})

return (hashParams.get(hashname));
}

window.addEventListener("load", function() {
messageExtention();
});
</script>
</head>
<body>
<div id="mainMessage">Please wait a few seconds...</div>
</body>
</html>
26 changes: 26 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"update_url": "https://clients2.google.com/service/update2/crx",

"name": "Twitch Category Change Notifier",
"description": "Know when your favorite streamers are changing categories",
"version": "1.0.1",
"manifest_version": 3,
"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1uE11ize3U8cy0zr3m1R8HxA1cDMAMGadNOP2v/HRVa7n3Td1Zm8Aj6wlYodv6emLzXRGF/WhAaKQatX97Hkm8Q2HQZ+CVoyCw7X5oD3VIZo3m+K2mmB9ViPdkQXWzITxZcGuA9KdxamragF9QG62UXEPAeEuajQQvfYlK4jdjNmXhT8lXa2aAJ3/G9x2x8GcRfzwi64K9/r0gV4GEyq0E91QQou4O8mw3eqTNbZ8DjhyhHJJAiEmghlz73st2UUCyCYDZT26J2KoKFa3oVXgkGpLoC/Z0C/i76lLhP6RjKB3WniWCS0HNmn4yPNkgTg+Evv2ogC/NzqEJRz/sMYEQIDAQAB",
"background": {
"service_worker": "background.js"
},"host_permissions": ["<all_urls>"],
"permissions": ["storage", "alarms", "scripting", "activeTab", "background"],
"action": {
"default_popup": "popup.html"
},
"icons": {
"256": "images/icon.png"
},
"externally_connectable": {
"matches": ["https://strikr.alwaysdata.net/*"]
},
"web_accessible_resources": [{
"resources": ["test.js"],
"matches": ["<all_urls>"]
}]
}
101 changes: 101 additions & 0 deletions popup.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style/mainframe.css" />
<link rel="stylesheet" href="style/bottombar.css" />
<link rel="stylesheet" href="style/checkbox.css" />
<link rel="stylesheet" href="style/tail.css" />

<script src="scripts/j.js"></script>
<script src="scripts/popup.js"></script>
<script src="scripts/tabs.js"></script>
<script src="scripts/tab_notifications.js"></script>
<script src="scripts/tail.js"></script>
</head>
<body>
<div id="top-bar">
<input id="searchbox" type="text" placeholder="Search Followed Streams" autofocus style="display: none;" />
<div id="disconnected-tip" style="display: inline-block;font-size:10px">TTV Category Change Notifier</div>
<div id="login-twitch">
<a href="https://id.twitch.tv/oauth2/authorize?client_id=eqtazaq0deq04n6k4s50zoujhyt5nu&redirect_uri=https://strikr.alwaysdata.net/&response_type=token&scope=user:read:follows" target="_blank"><button>Login with Twitch</button></a>
</div>
<div id="user-infos-top" style="display: none;" title="Click to disconnect">
<img id="user-pic-top" src="https://static-cdn.jtvnw.net/jtv_user_pictures/599b546a-c27f-4684-93ff-5eeecd01fb2b-profile_image-300x300.png" />
<span style="color:white;padding-right: 20px;font-size: 14px;line-height: 2.5;">Click here to Logout.</span><span id="username-top">Twitch User</span>
</div>
</div>
<div id="disconnected-stream-tip" style="display: block;">
<h3> </h3>
<p style="padding: 5px;">Don't like the current game a streamer is playing? <br><br> Waiting for a streamer to finally start playing something? <br><br> Missed another watch party because it was unannounced? <br><br></p>
<h3 style="padding: 5px;">Login with your Twitch account and create alerts for your individual use case.</h3>
<div style="
display: flex;
gap: 10px;
align-items: center;
border-top: 1px solid white;
border-bottom: 1px solid white;
padding: 5px 5px;
position: fixed;
bottom: 0;
font-size: 11px;
text-align: left;
">
<a href="https://www.paypal.com/donate/?hosted_button_id=9Z7WPBS5YRJBS" target="_blank"><input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" title="PayPal - The safer, easier way to pay online!" alt="Donate with PayPal button"></a>
<span style="color:white">I am very grateful for PayPal donations, even smol ones. -<span style="font-style: italic; font-weight: 900">ttv/Strikr</span></span>

</div>
</div>
<div class="tab" id="notifications-page" style="display: none;">
<img class="loading" src="images/loading.svg" />


<div id="notify-all-streams" style="display: none;">

<input id="notify-all-streams-checkbox" class="checkbox" type=checkbox >

</div>

<div style="
display: flex;
gap: 10px;
align-items: center;
border-top: 1px solid white;
border-bottom: 1px solid white;
padding: 5px 0;
position: fixed;
bottom: 0;
font-size: 11px;
text-align: left;
">
<a href="https://www.paypal.com/donate/?hosted_button_id=9Z7WPBS5YRJBS" target="_blank"><input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" border="0" name="submit" title="PayPal - The safer, easier way to pay online!" alt="Donate with PayPal button"></a>
<span style="color:white">I am very grateful for PayPal donations, even smol ones. -<span style="font-style: italic; font-weight: 900">ttv/Strikr</span></span>

</div>


<div id="notifications">
<div class="separator">Add new Alert?</div>
<div id="alertcreator"></div>
</div>


<h2 style="color:white">Currently active Alerts:</h2>
<div class="all-alerts">
</div>



<div id="informations" style="display: block;">
<span id="last-streams-update"></span>
</div>
</div>
<div id="bottom-bar" style="display: block;">
<div class="icon" style="display: none; width: 25px; height: 25px; margin-top: 5px; margin-left: 4px;"></div>
<div id="tabs">

<div class="tab-button" id="streams-notifications-button">
</div>
</div>
</div>
</body>
</html>
2 changes: 2 additions & 0 deletions scripts/j.js

Large diffs are not rendered by default.

Loading

0 comments on commit 2b4b3bc

Please sign in to comment.