Skip to content

Instantly share code, notes, and snippets.

View Alexisgt01's full-sized avatar

Alexis Gatuingt Alexisgt01

View GitHub Profile
var obfusque = function() {
var links = document.querySelectorAll('.obf')
console.log(links)
if(links) {
for (var i = 0; i < links.length; i++) {
var link = links[i]
link.addEventListener('click', function (e) {
var href = atob(this.dataset.href)
window.location.replace(href)
})
var counter = function(e, nb = 50, inverse = false) {
var span = e.nextSibling.nextSibling
var parent = e.parentNode.parentNode
if (inverse == false) {
span.innerText = e.value.length + '/' + nb + ' caractères restant'
if (e.value.length > nb || e.value.length == 0) {
parent.classList.add('has-error')
@Alexisgt01
Alexisgt01 / Wordpress custom login page
Last active August 30, 2019 11:04
Wordpress custom login page : change color & logo
function new_login_page() {
?>
<style type="text/css">
body.login div#login h1 a {
background-image: "your image";
background-size: 100%;
width: 220px;
padding-bottom: 30px;
}
.login #login_error, .login .message, .login .success {