commit
04c0df30e7
|
@ -73,8 +73,8 @@ class Utils {
|
|||
});
|
||||
return path;
|
||||
},
|
||||
"darwin": () => "/Applications/Discord.app",
|
||||
"linux": () => "" // TODO
|
||||
"darwin": () => "/Applications/Discord.app/Contents",
|
||||
"linux": () => "/usr/share/discord"
|
||||
}[platform]();
|
||||
|
||||
}
|
||||
|
@ -84,8 +84,12 @@ class Utils {
|
|||
"win32": () => {
|
||||
return `${process.env.APPDATA}/BetterDiscord/lib`;
|
||||
},
|
||||
"darwin": () => {
|
||||
return `${process.env.HOME}/.local/share/BetterDiscord`;
|
||||
},
|
||||
"linux": () => {
|
||||
return ""; // TODO
|
||||
// FIXME: for a non-root user, a path like OSX's makes more sense
|
||||
return "/usr/local/share/BetterDiscord";
|
||||
}
|
||||
}[platform]();
|
||||
}
|
||||
|
|
|
@ -244,14 +244,10 @@ function init() {
|
|||
|
||||
switch(alc) {
|
||||
case "y":
|
||||
install();
|
||||
break;
|
||||
case "yes":
|
||||
install();
|
||||
break;
|
||||
case "n":
|
||||
process.exit();
|
||||
break;
|
||||
case "no":
|
||||
process.exit();
|
||||
break;
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2015-present Jiiks | Jiiks.net
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -2,23 +2,47 @@
|
|||
|
||||
var agif = function () {};
|
||||
|
||||
agif.prototype.convert = function () {
|
||||
$(".image canvas").each(function() {
|
||||
var src = $(this).attr("src");
|
||||
if(src != undefined) {
|
||||
$(this).replaceWith('<img src="'+src+'"></img>');
|
||||
// Autoplay GIFs
|
||||
agif.prototype.convert = function (target) {
|
||||
// Handle GIF
|
||||
$(target).find(".image:has(canvas)").each(function () {
|
||||
var image = $(this);
|
||||
var canvas = image.children("canvas").first();
|
||||
// Replace GIF preview with actual image
|
||||
var src = canvas.attr("src");
|
||||
if(src !== undefined) {
|
||||
image.replaceWith($("<img>", {
|
||||
src: canvas.attr("src"),
|
||||
width: canvas.attr("width"),
|
||||
height: canvas.attr("height"),
|
||||
}).addClass("image kawaii-autogif"));
|
||||
}
|
||||
});
|
||||
|
||||
// Handle GIFV
|
||||
$(target).find(".embed-thumbnail-gifv:has(video)").each(function () {
|
||||
var embed = $(this);
|
||||
var video = embed.children("video").first();
|
||||
// Remove the class, embed-thumbnail-gifv, to avoid the "GIF" overlay
|
||||
embed.removeClass("embed-thumbnail-gifv").addClass("kawaii-autogif");
|
||||
// Prevent the default behavior of pausing the video
|
||||
embed.parent().on("mouseout.autoGif", function (event) {
|
||||
event.stopPropagation();
|
||||
});
|
||||
video[0].play();
|
||||
});
|
||||
};
|
||||
|
||||
agif.prototype.onMessage = function () {
|
||||
this.convert();
|
||||
};
|
||||
agif.prototype.onSwitch = function () {
|
||||
this.convert();
|
||||
};
|
||||
agif.prototype.onMessage = function () {};
|
||||
|
||||
agif.prototype.onSwitch = function () {};
|
||||
|
||||
agif.prototype.start = function () {
|
||||
this.convert();
|
||||
this.convert(document);
|
||||
};
|
||||
|
||||
agif.prototype.observer = function (e) {
|
||||
this.convert(e.target);
|
||||
};
|
||||
|
||||
agif.prototype.load = function () {};
|
||||
|
@ -35,8 +59,8 @@ agif.prototype.getDescription = function () {
|
|||
return "Autoplay gifs without having to hover.";
|
||||
};
|
||||
agif.prototype.getVersion = function () {
|
||||
return "0.1.0";
|
||||
return "1.0.0";
|
||||
};
|
||||
agif.prototype.getAuthor = function () {
|
||||
return "Jiiks";
|
||||
return "noodlebox";
|
||||
};
|
12
README.md
12
README.md
|
@ -10,7 +10,7 @@ Note that this whole branch is deprecated. all further development is going on h
|
|||
|
||||
Better Discord App enhances the Discord desktop app with new features.
|
||||
|
||||
![ss](http://puu.sh/oIO58.png)
|
||||
![ss](http://i.imgur.com/Gj6oD7z.png)
|
||||
|
||||
## Windows Universal Installer
|
||||
* Download the latest installer from [releases](https://github.com/Jiiks/BetterDiscordApp/releases)
|
||||
|
@ -52,8 +52,8 @@ Minimal mode makes elements smaller and hides certain elements.
|
|||
Only display voice channels
|
||||
|
||||
**Public Servers:**
|
||||
A modal window for public servers [DiscordServers.com](https://www.discordservers.com/)
|
||||
![ss](http://puu.sh/o9oNl.png)
|
||||
Public server listing provided by: [DiscordServers.com](https://www.discordservers.com/)
|
||||
![ss](http://i.imgur.com/BVUZlu9.png)
|
||||
|
||||
**Custom CSS**
|
||||
BetterDiscord supports custom CSS for styling Discord to your liking.
|
||||
|
@ -81,14 +81,14 @@ Add your server there and it will appear in the list!
|
|||
## Credits
|
||||
* MacOS Installer by [Candunc](https://github.com/Candunc)
|
||||
* Emote titles by [pendo324](https://github.com/pendo324)
|
||||
* Majority of FFZ emote work by [Pohky] (https://github.com/pohky)
|
||||
* Majority of BTTV emote work by [EhsanKia] (https://github.com/EhsanKia)
|
||||
* Majority of FFZ emote work by [Pohky](https://github.com/pohky) and [DeathStrikeV](https://github.com/DeathStrikeV)
|
||||
* Majority of BTTV emote work by [EhsanKia](https://github.com/EhsanKia)
|
||||
|
||||
## License
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015-2016 Jiiks | [Jiiks.net] (https://jiiks.net)
|
||||
Copyright (c) 2015-present Jiiks | [Jiiks.net](https://jiiks.net)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
459
css/main.css
459
css/main.css
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -232,6 +232,27 @@
|
|||
"Ares",
|
||||
"Zerker",
|
||||
"Hiho",
|
||||
"Wurst"
|
||||
"Wurst",
|
||||
"Dood",
|
||||
"Charizard",
|
||||
"Eggman",
|
||||
"Resetti",
|
||||
"Pineapple",
|
||||
"Lonk",
|
||||
"Bryce",
|
||||
"Nono",
|
||||
"Fennec",
|
||||
"Slapstick",
|
||||
"Ribombee",
|
||||
"Shaymin",
|
||||
"Lucarionite",
|
||||
"Bryce",
|
||||
"Charlotte",
|
||||
"Gramps",
|
||||
"MSPaint",
|
||||
"Excalibur",
|
||||
"Abaddon",
|
||||
"Moddb",
|
||||
"Hai!"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Reopening issues now that I'm actively developing this again. Feel free to reopen your issue if it's still relevant.
|
3275
js/main.js
3275
js/main.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,45 @@
|
|||
@ECHO off
|
||||
|
||||
:prompt
|
||||
set /P c=Are you sure you want to uninstall BetterDiscord [Y/N]?
|
||||
echo.
|
||||
if /I "%c%" EQU "Y" goto :removeBetterDiscord
|
||||
if /I "%c%" EQU "N" goto :eof
|
||||
goto :prompt
|
||||
|
||||
:removeBetterDiscord
|
||||
echo Removing BetterDiscord...
|
||||
echo.
|
||||
|
||||
:: Delete %appdata%\BetterDiscord
|
||||
call:deleteFolder %appdata%\BetterDiscord
|
||||
|
||||
:: Remove BetterDiscord from all app versions
|
||||
for /d %%G in ("%localappdata%\Discord\app-*") do (
|
||||
call:deleteFolder "%%G\resources\node_modules\BetterDiscord"
|
||||
call:deleteFolder "%%G\resources\app"
|
||||
)
|
||||
|
||||
goto:end
|
||||
|
||||
:: Checks whether a folder exists and deletes it if it does
|
||||
:deleteFolder
|
||||
if exist "%~1" (
|
||||
@RD /S /Q "%~1"
|
||||
echo Folder "%~1" removed.
|
||||
) else (
|
||||
echo Folder "%~1" does not exist.
|
||||
)
|
||||
goto:eof
|
||||
|
||||
:end
|
||||
echo.
|
||||
echo Restarting Discord...
|
||||
taskkill /f /im Discord.exe 1>nul 2>nul
|
||||
"%localappdata%\Discord\Update.exe" --processStart Discord.exe
|
||||
|
||||
echo.
|
||||
echo BetterDiscord has been removed!
|
||||
echo.
|
||||
|
||||
pause
|
Loading…
Reference in New Issue