Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
js scripts for tampermonkey to change the appearance of hackaday.io
// ==UserScript==
// @name hadBeautifier
// @namespace http://hackaday.io/hacker/3459
// @version 0.1
// @description This changes the appearance of all pages
// @match *://hackaday.io
// @match *://hackaday.io/*
// @copyright 2014+, DaveDarko
// ==/UserScript==
$('.header .container .logo a').attr('href', 'https://hackaday.io/project/' + Math.floor((Math.random() * 2389) + 1))
$('.footer').after(
'<style>'
+ '.headline:after {display:none}; '
+ '.headline {margin-top: 1.5em;}'
+ '.section h5 {color: #af8f4a;}'
+ '.headline h2 {font-size: 3.5rem;}'
+ '.sort-holder { background-color:#222; width:50%}'
+ '.sort-holder.pull-right { text-align:right;}'
+ '.sort-holder.pull-right .j-select-holder { text-align:left;}'
// footer
+ '.footer:before {display:none;}'
+ '.container:after {display:none;}'
+ '.footer.had-skull {margin-top:10px;margin-bottom:10px;}'
+ '.home-section-tags { width:100%; padding-top: 25px; margin-bottom: 30px}'
+ '.home-section-tags:before { display:none}'
+ '.home-section-tags:after { display:none}'
+ '</style>');
$('.pagination').after('<style>.pagination:after {display:none}</style>');
$('.header').after('<style>.header .container {padding-top: 5px; padding-bottom: 0px; }</style>');
$('.header').css('height','60px');
$('.project-item').css('padding','10px');
$('.project-item').css('margin-bottom','10px');
$('.project-item').css('background-color','#222');
$('.grey-gold-button').css('-webkit-border-radius','10px');
$('.grey-gold-button').css('-moz-border-radius','10px');
$('.grey-gold-button').css('-ms-border-radius','10px');
$('.grey-gold-button').css('-o-border-radius','10px');
$('.grey-gold-button').css('border-radius','10px');
$('.gold-gold-button').css('-webkit-border-radius','10px');
$('.gold-gold-button').css('-moz-border-radius','10px');
$('.gold-gold-button').css('-ms-border-radius','10px');
$('.gold-gold-button').css('-o-border-radius','10px');
$('.gold-gold-button').css('border-radius','10px');
// ==UserScript==
// @name hadHideFSkullNFollower
// @namespace http://hackaday.io/hacker/3459
// @version 0.1
// @description hides unimportant skull giving to other projects and new followers, you have to add your own links
// @match http://hackaday.io/myfeed*
// @copyright 2014+, DaveDarko
// ==/UserScript==
$('.projectSkull').hide();
$.each ($('.projectSkull'), function (i_div ,v_div) {
var div = $(this);
$.each( v_div.getElementsByClassName('feed-activity'), function (i_feed, v_feed) {
$.each( v_feed.getElementsByTagName('a'), function (i_a, v_a) {
console.log(v_a.href);
if (v_a.href == "link to your project") div.show();
})
})
});
$('.projectFollow').hide();
$.each( $('.projectFollow'), function (i_div ,v_div) {
var div = $(this);
$.each( v_div.getElementsByClassName('feed-activity'), function (i_feed, v_feed) {
$.each( v_feed.getElementsByTagName('a'), function (i_a, v_a) {
console.log(v_a.href);
if (v_a.href == "link to your project") div.show();
})
})
});
// ==UserScript==
// @name hadProfile
// @namespace http://hackaday.io/hacker/3459
// @version 0.1
// @description changes the apperance of the hackerprofile
// @match http://hackaday.io/hacker/*
// @copyright 2014+, DaveDarko
// ==/UserScript==
$('.section.section-links').after($('.section-skull-and-like-projects').parent());
$('#j-discussion-add').after (
'<style>'
// stuff
+ ' .author {display: inline; margin:0px } '
// left
+ '.content-left .section {padding: 10px; background-color: #222;margin-bottom:20px} '
+ '.section-profile-stats:after {display:none;}'
+ '.section:after {display:none;}'
+ '.section-skull-and-like-projects .project-item.last-child { float: none; margin-right: 0; }'
+ '.section-skull-and-like-projects .project-item {width: 33%;float: left;margin-right: 3.31126%;}'
// right
+ '.content-right .section { background-color: #222; padding: 10px; margin-bottom:20px} '
+ '.section-profile-my-project .project-item { width: 103%; margin-left: -10px !important; padding: 10px !important;}'
+ '.section-profile-my-project .project-item.m-last-child { margin-bottom: 20px !important; }'
+'</style>'
);
$.each ($('.project-item'), function (i,v) {$(this).css('padding','5px')});
$.each ($('.project-item'), function (i,v) {$(this).css('margin','0px')});
// ==UserScript==
// @name hadProject
// @namespace http://hackaday.io/hacker/3459
// @version 0.1
// @description changes the apperance of a project
// @match http://hackaday.io/project/*
// @copyright 2014+, DaveDarko
// ==/UserScript==
$('.section.section-project-stats').after($('.section.section-components'));
$('p.description').append(' - by ');
$('p.description').append($('.author'));
$('#j-discussion-add').after (
'<style>'
// stuff
+ ' .author {display: inline; margin:0px } '
// left
+ '.content-left .section {padding: 10px; margin-bottom:20px; background-color: #222;} '
+ '.section.section-project-stats:after {display:none;}'
+ '.section.section-team:after {display:none;}'
+ '.section.section-links:after {display:none;}'
+ '.section.section-tags:after {display:none;}'
+ '.section.section-share:after {display:none;}'
+ '.section.section-project-time:after {display:none;}'
+ '.section.section-project-time.last:after {display:none;}'
// right
+ '.content-right .section { background-color: #222; margin-left: -100px; padding: 10px; margin-bottom:20px} '
+ '.section.section-description:after {display:none;}'
+ '.section.section-details:after {display:none;}'
+ '.section.section-components:after {display:none;}'
+ '.section.section-buildlogs:after {display:none;}'
+ '.section.section-instructions:after {display:none;}'
+ '.section.section-discussions:after {display:none;}'
+'</style>'
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment