Skip to content

Instantly share code, notes, and snippets.

View rqreyes's full-sized avatar

Randy Reyes rqreyes

View GitHub Profile
@rqreyes
rqreyes / linkedin-endorser.js
Created April 22, 2020 21:05
linkedin endorser
setTimeout(() => {
document
.querySelectorAll(
'button.pv-skill-entity__featured-endorse-button-shared.artdeco-button'
)
.forEach((button) => {
if (button.innerHTML.includes('plus-icon')) button.click();
});
}, 2000);
@rqreyes
rqreyes / scripts.js
Created June 12, 2018 21:01
smooth scroll with interruption
var page = $("html, body");
$('a[href*="#"]').click(function(e) {
page.on("scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove", function(){
page.stop();
});
page.animate({ scrollTop: $(this).position().top }, 'slow', function(){
page.off("scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove");
@rqreyes
rqreyes / scripts.js
Last active January 23, 2018 20:06
parallax
function parallax() {
var scrolledY = $(window).scrollTop();
$(".container").css("background-position", "center -" + ((scrolledY * 0.2)) + "px");
}
parallax();
$(window).scroll(function () {
parallax();
});
@rqreyes
rqreyes / style.css
Created October 17, 2017 19:02
update css specifically for firefox
@-moz-document url-prefix() {
width: 100%;
}
@rqreyes
rqreyes / sitelayout_scripts.js
Last active December 16, 2017 02:33
fix ie and edge mousewheel jitter
if (navigator.userAgent.match(/Trident\//) || navigator.userAgent.match(/Edge\//)) {
document.body.addEventListener("mousewheel", function(evt) {
evt.preventDefault();
var wd = evt.wheelDelta;
var csp = window.pageYOffset;
window.scrollTo(0, csp - wd);
});
}
@rqreyes
rqreyes / _objects.small-boxes.less
Created October 13, 2017 20:02
overwrite template meetings manager widget styles
.small_box.meeting_box {
.box_header {
padding: 0;
border-bottom: none;
margin: 0;
}
.box_title {
display: block;
font-size: @mobile-header-font-size !important;
font-weight: @mobile-header-font-weight !important;
@rqreyes
rqreyes / sitelayout_scripts.js
Last active October 9, 2017 18:16
replace breadcrumb text
$(".breadcrumb").html($(".breadcrumb").html().replace("»", ">"));
@rqreyes
rqreyes / sitelayout_scripts.js
Last active January 4, 2018 04:04
when clicking outside, hide searchbox
$('.search-trigger').click(function () {
$(this).toggleClass('active');
$("#searchbox").toggle();
$("#searchbox input").focus();
});
if (window.matchMedia("(min-width: 48em)").matches) {
var exclude_div = $("#searchbox, #searchbox *");
$(document).click(function (e) {
if (!(exclude_div.is(e.target)) && !($(e.target).hasClass('search-trigger'))) {
@rqreyes
rqreyes / widget builder - home collage
Last active October 9, 2017 18:07
if no title and description exist, hide slide content background
@if (!string.IsNullOrWhiteSpace(title)) {
<div class="slide_content">
<div class="container">
<h2 class="slide_title">@title</h2>
@if (!string.IsNullOrWhiteSpace(desc)) {
<p class="slide_description">
@desc
@if (href != "javascript:void(0);") {
<a href="@href" class="slide_link">Learn More</a>
}
@rqreyes
rqreyes / .htaccess
Created May 20, 2016 20:00
410 redirect
Redirect gone /path/path/folder/
ErrorDocument 410 default