Skip to content

Instantly share code, notes, and snippets.

View lucianobragaweb's full-sized avatar
🏠
Working from home

Luciano Braga lucianobragaweb

🏠
Working from home
View GitHub Profile
@lucianobragaweb
lucianobragaweb / WhatsAppLink.html
Last active February 19, 2022 14:04
Simples link para abrir o WhatsApp em seu site. Atualizando o post em: http://lucianobragaweb.com.br/whatsapp-no-site/
@lucianobragaweb
lucianobragaweb / AumentarDiminuirFonteJavascript.js
Last active February 19, 2022 14:03
Exemplo simples de como criar botões de acessibilidade para aumentar e diminuir o tamanho do texto em elementos do seu site.
function fonte(e){
let elemento = $(".acessibilidade");
let fonte = elemento.css('font-size');
if (e == 'a') {
elemento.css("fontSize", parseInt(fonte) + 1);
} else if('d'){
elemento.css("fontSize", parseInt(fonte) - 1);
}
}
@lucianobragaweb
lucianobragaweb / likeFacebook.js
Last active February 19, 2022 14:00
Script para Curtir no Facebook automaticamente.
var HTMLTagA= document.getElementsByTagName("a");
var cnt= 0;
var i= 0;
var randon = 150; // Internavo Inicial
var TimerFunCall = setInterval(Timer, randon);
function Timer() {
if (i < HTMLTagA.length){
if(HTMLTagA[i].outerHTML.contains('UFILikeLink')) {
@lucianobragaweb
lucianobragaweb / BotãoWhatsApp.html
Last active February 19, 2022 13:54
Como abrir o WhatsAPP através de link no seu site
<!--
Subistitua o Número(88988459521) pelo seu número do WhatsApp
Siga este padrão: DDD + Numero, ex: 88 9 8845 9521 (Meu Número Whats)
-->
<a href="intent://send/88988459521#Intent;scheme=smsto;package=com.whatsapp;action=android.intent.action.SENDTO;end">Vamos Conversar?</a>
<!-- Mais Detalhes Aqui: https://lucianobragaweb.github.io/post/whatsapp-no-site/ -->
@lucianobragaweb
lucianobragaweb / gistOnTheme.html
Last active February 19, 2022 13:53
Incluir Gist em posts do Tumblr
<!-- Incluir na edição do tema Tumblr -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script>
<script src="http://static.tumblr.com/fpifyru/VCxlv9xwi/writecapture.js"></script>
<script src="http://static.tumblr.com/fpifyru/AKFlv9zdu/embedgist.js"></script>
@lucianobragaweb
lucianobragaweb / loopPostFormats.php
Last active February 19, 2022 13:49
Loop para Post Formats no Wordpress
<?php
if (have_posts()) : while (have_posts()) : the_post();
// verifica o formato do post para exibir
if(!get_post_format()) { // se não for definido um formato
get_template_part('loop'); // carrega o loop padrão
} else { // senão, ou seja, se for um formato diferente
get_template_part('loop', get_post_format()); // carrega o loop correspondente, ex: quote, status, etc...
}
endwhile;
endif;
@lucianobragaweb
lucianobragaweb / postFormatsSuport.php
Last active February 19, 2022 13:48
Adicionando suporte a Post Formats no Wordpress
<?php
// Adicionando suporte a Post Formats
$formatos = array( 'gallery', 'link', 'image', 'quote', 'video', 'audio', ); // definindo os formatos a serem suportados
// iplementando o suporte através da função add_theme_support();, passando a variável $suporte
add_theme_support( 'post-formats', $formatos );
@lucianobragaweb
lucianobragaweb / botaoContinuarComprando.php
Last active February 19, 2022 13:45
Botão Continuar Comprando - WooCommerce
<?php
/*
Plugin Name: Botão Continuar Comprando
Plugin URI: https://lucianobragaweb.github.io
Description: Redefine o link do botão [Continuar Comprando]
Version: 1.0
Author: Luciano Braga
Author URI: https://lucianobragaweb.github.io
License: MIT
*/
@lucianobragaweb
lucianobragaweb / mudarNomeMenu.php
Last active February 19, 2022 13:47
Substitui nomes de itens de menu no wp-admin
<?php
add_filter('gettext', 'renomear_itens_do_menu');
add_filter('ngettext', 'renomear_itens_do_menu');
/**
* Substitui nomes de itens de menu no wp-admin
*
* @author Daan Kortenbach
*
* @param array $menu The menu array.
@lucianobragaweb
lucianobragaweb / editar.js
Created April 17, 2014 17:38
Editar página no Bowser
javascript:document.body.contentEditable='true'; document.designMode='on'; void 0