Skip to content

Instantly share code, notes, and snippets.

View Benzi's full-sized avatar
typeof benzi === 'object'

Benzi

typeof benzi === 'object'
View GitHub Profile
@Benzi
Benzi / test.js
Created March 31, 2015 09:04
test
console.log("test")
@Benzi
Benzi / notifs.js
Last active August 29, 2015 14:18
Get chat notifications from plug.dj
(function() {
var notify = false;
if ("Notification" in window) {
if (Notification.permission === "granted") {
notify = true;
} else if (Notification.permission === "default") {
Notification.requestPermission(function(permission) {
if (!("permission" in Notification && permission === "granted")) {
Notification.permission = permission;
@Benzi
Benzi / autowoot.js
Created April 11, 2015 07:33
Very basic autowoot for plug.dj
(function() {
API.chatLog("Autowoot turned ON");
API.chatLog("Credit: http://benzi.io");
$("#woot").click();
API.on(API.ADVANCE,function(){
setTimeout(function(){
$("#woot").click();
},1000);
});
@Benzi
Benzi / BanScript.js
Last active August 29, 2015 14:21
Bans all current and incoming peasants in a plug.dj community
(function() {
var banning = false;
function killAPI() {
API.off(API.CHAT_COMMAND);
}
API.on(API.CHAT_COMMAND, function(command) {
if (command === "/banall") {
if (banning) {
@Benzi
Benzi / getPlugged.js
Created May 26, 2015 11:17
Script for getting plug.dj babes.
API.sendChat("I know Benzi.");
@Benzi
Benzi / togglePlayback.js
Last active August 29, 2015 14:22
Toggles video playback on plug.dj
(function() {
if ($("#playback").is(":visible")){
$('#playback').hide();
}
else {
$('#playback').show();
}
// Credit: Benzi (Benzi Mooneegan)
@Benzi
Benzi / getSongLink.js
Created May 31, 2015 17:30
Returns link to current song playing in plug.dj community
@Benzi
Benzi / naSkip.js
Last active August 29, 2015 14:23
Automatically skip songs that are not available.
/*
Copyright (c) 2015 by Benzi (Benzi Mooneegan)
Please do not copy or modify without permission from the owner.
Description: This script is used to automatically skip songs that are not available.
*/
function naSkip() {
var format = API.getMedia().format;
var cid = API.getMedia().cid;
@Benzi
Benzi / face.svg
Created July 19, 2015 22:48
SVG code for face.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Benzi
Benzi / customBadge.js
Created August 24, 2015 19:56
You can use this to inject CSS on a page. The example shows how to use a custom badge on plug.dj
// Edit the url to point to your custom badge
// Edit the data-cid to include your user ID
var css = '[data-cid^="3851534-"] .badge-box .bdg {background: url("https://ssl.benzi.io/code/qluster/images/badges/eyes.png")!important;}',
head = document.head || document.getElementsByTagName('head')[0],
style = document.createElement('style');
style.type = 'text/css';
if (style.styleSheet){