Skip to content

Instantly share code, notes, and snippets.

View panphora's full-sized avatar
👋
Hello

David Miranda panphora

👋
Hello
View GitHub Profile
@panphora
panphora / slow-down-twitch-chat.js
Created February 25, 2016 02:14
Slow down twitch chat
// INSTRUCTIONS
// 1. paste in Google Chrome dev console
// 2. enjoy!
// don't display any chat messages by default
var style = document.createElement("style");
style.appendChild(document.createTextNode(""));
document.head.appendChild(style);
style.sheet.insertRule("body .ember-chat .chat-messages .chat-line {display: none;}", 0);
### Keybase proof
I hereby claim:
* I am panphora on github.
* I am panphora (https://keybase.io/panphora) on keybase.
* I have a public key whose fingerprint is 516E 6816 D1C8 3E13 587F EE35 3D43 81AC 9975 8203
To claim this, I am signing this object:
Template.DiscoverPage.events({
'click .tab-link': function (e, template) {
e.preventDefault();
var $tabLink = $(e.currentTarget);
var tabName = $tabLink.data('tab-name');
template.currentTab.set(tabName || 'recent projects');
}
});
Template.DiscoverPage.helpers({
currentTabIs: function (tabName) {
return Template.instance().currentTabIs(tabName);
},
selectedIfCurrentTabIs: function (tabName) {
if (Template.instance().currentTabIs(tabName)) {
return 'selected';
} else {
return '';
}
<template name="DiscoverPage">
<div class="nav">
<a class="tab-link {{selectedIfCurrentTabIs 'recent projects'}}" href="#" data-tab-name="recent projects">recent projects</a>
<a class="tab-link {{selectedIfCurrentTabIs 'recent sketches'}}" href="#" data-tab-name="recent sketches">recent sketches</a>
</div>
{{#if currentTabIs 'recent projects'}}
{{> RecentProjects }}
{{/if}}
{{#if currentTabIs 'recent sketches'}}
{{> RecentSketches }}
Template.DiscoverPage.created = function () {
this.currentTab = new ReactiveVar('recent projects');
this.currentTabIs = function (tabName) {
return tabName === Template.instance().currentTab.get();
}
};
Template.DiscoverPage.created = function () {
this.currentTab = new ReactiveVar('recent projects');
};
meteor add reactive-var
a = ['https://dl.dropboxusercontent.com/u/3227675/thrivehive/my%20contacts/mockup2/my-contacts-list-view.png', 'https://dl.dropboxusercontent.com/u/3227675/thrivehive/my%20contacts/mockup2/my-contacts-list-view-alt.png','https://dl.dropboxusercontent.com/u/3227675/thrivehive/my%20contacts/mockup2/my-contacts-contact-view.png'];
a.forEach(function (link) { window.open(link, '_blank'); })
.footer-widgets {
background-position: bottom left;
padding-bottom: 280px;
}