Skip to content

Instantly share code, notes, and snippets.

View ignacioribes's full-sized avatar
💭
Hello World 👽

Ignacio Ribes ignacioribes

💭
Hello World 👽
View GitHub Profile
@ignacioribes
ignacioribes / GasPricesWidget.js
Last active May 19, 2022 08:24
A scriptable Gas Price Widget
const ethGasStationApiUrl = `https://ethgasstation.info/api/ethgasAPI.json`;
const req = new Request(ethGasStationApiUrl);
const res = await req.loadJSON();
if (config.runsInWidget) {
const widget = new ListWidget();
const title = widget.addText("Gas Prices");
title.textColor = Color.white();
title.textOpacity = 0.8;
@ignacioribes
ignacioribes / scroll-top-tab.html
Last active August 19, 2022 20:20
Scroll to top tab elementor wordpress
<script type="text/javascript">
// Scroll to tab top
jQuery('.elementor-tab-title').on('click', function (e) {
var idName = jQuery(this).attr('id');
console.log(idName)
setTimeout(function (){
// Code you want to delay or you can call the function reference directly instead of defining one
jQuery('html, body').animate({
scrollTop: jQuery("#" + idName).offset().top
}, 'slow');
@ignacioribes
ignacioribes / cookie.js
Last active February 23, 2023 20:17
Cookie UTM
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="https://www.w3.org/1999/xhtml" lang="es">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<style type="text/css">
/* ///////// CLIENT-SPECIFIC STYLES ///////// */
#outlook a{padding:0;} /* Force Outlook to provide a "view in browser" message */
.ReadMsgBody{width:100%;} .ExternalClass{width:100%;} /* Force Hotmail to display emails at full width */
.ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div {line-height: 100%;} /* Force Hotmail to display normal line spacing */
body, table, td, p, a, li, blockquote{-webkit-text-size-adjust:100%; -ms-text-size-adjust:100%;} /* Prevent WebKit and Windows mobile changing default text sizes */