Skip to content

Commit

Permalink
finish
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMaxium69 committed Sep 1, 2021
1 parent 2d25307 commit 8ab4d92
Show file tree
Hide file tree
Showing 7 changed files with 89 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: ['TheMaxium69']
Binary file added .github/readme.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# LocalHostPremid
Extension Premid, Affiche LocalHost dans premid

<img src="/.github/readme.png">

21 changes: 21 additions & 0 deletions dist/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"$schema": "https://schemas.premid.app/metadata/1.3",
"author": {
"name": "TheMaximeSan",
"id": "363366883652796416"
},
"service": "LocalHost",
"description": {
"en": "LocalHost Site"
},
"url": "localhost",
"version": "1.0.0",
"logo": "https://w7.pngwing.com/pngs/56/125/png-transparent-earth-logo-internet-icon-web-symbol-s-computer-network-internet-web-symbol-cliparts-thumbnail.png",
"thumbnail": "https://i2.wp.com/www.team-ever.com/wp-content/uploads/2017/08/WampServer-logo.png",
"color": "#ff33d7",
"tags": [
"localhost",
"wamp"
],
"category": "other"
}
26 changes: 26 additions & 0 deletions dist/presence.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
const presence = new Presence({
clientId: "882601636042772512"
});
let engine = "wamp";
const browsingStamp = Math.floor(Date.now() / 1000);
presence.on("UpdateData", async () => {
const presenceData = {
details: "Developing in progress",
largeImageKey: engine,
state: engine,
startTimestamp: browsingStamp,
};
if (document.location.pathname.includes("/phpmyadmin/")) {
presenceData.details = "PhpMyAdmin";
presenceData.largeImageKey = "pma";
presenceData.smallImageKey = engine;
presenceData.smallImageText = engine;
}
if (presenceData.details == null) {
presence.setTrayTitle();
presence.setActivity();
}
else {
presence.setActivity(presenceData);
}
});
29 changes: 29 additions & 0 deletions presence.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
const presence = new Presence({
clientId: "882601636042772512"
});

/*Option : wamp, lamp, xamp */
let engine = "wamp";
const browsingStamp = Math.floor(Date.now() / 1000);

presence.on("UpdateData", async () => {
const presenceData: PresenceData = {
details: "Developing in progress",
largeImageKey: engine,
state : engine,
startTimestamp : browsingStamp,
};
if (document.location.pathname.includes("/phpmyadmin/")) {
presenceData.details = "PhpMyAdmin";
presenceData.largeImageKey = "pma";
presenceData.smallImageKey = engine;
presenceData.smallImageText = engine;
}

if (presenceData.details == null) {
presence.setTrayTitle();
presence.setActivity();
} else {
presence.setActivity(presenceData);
}
});
7 changes: 7 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "./dist/"
}
}

0 comments on commit 8ab4d92

Please sign in to comment.