Skip to content

Instantly share code, notes, and snippets.

View msanroman's full-sized avatar
📈
1% better every day

Mike San Román msanroman

📈
1% better every day
View GitHub Profile
@pmhoudry
pmhoudry / trixUpload.js
Last active May 7, 2021 16:37
Trix upload button in VanillaJs
(function() {
// Adding upload button to Trix toolbar on initialization
document.addEventListener('trix-initialize', function(e) {
trix = e.target;
toolBar = trix.toolbarElement;
// Creation of the button
button = document.createElement("button");
button.setAttribute("type", "button");
button.setAttribute("class", "attach");
@carlosvillu
carlosvillu / i18n.coffee
Created August 23, 2012 23:22
Idea para tener i18n con Require
class I18n
constructor: (@dicc={}) ->
_: (text) ->
@dicc[text] or text
browserLanguage = navigator.language ||
navigator.userLanguage ||
'en'