Skip to content

Instantly share code, notes, and snippets.

View marxo's full-sized avatar
🖖
Dif-tor heh smusma.

Марко Кажић marxo

🖖
Dif-tor heh smusma.
View GitHub Profile
import re
import shutil
import argparse
from os import path
from sys import stderr
#
# Author: Daxda
# Date: 02.04.2014
# WTF: This is a quick tool I've hacked together to easily remove the meta
@marxo
marxo / translit-wip.js
Created May 14, 2016 21:13
Serbian transliterator
(function() {
var cyrillic = 'А_Б_В_Г_Д_Ђ_Е_Ё_Ж_З_И_Й_Ј_К_Л_Љ_М_Н_Њ_О_П_Р_С_Т_Ћ_У_Ф_Х_Ц_Ч_Џ_Ш_Щ_Ъ_Ы_Ь_Э_Ю_Я_а_б_в_г_д_ђ_е_ё_ж_з_и_й_ј_к_л_љ_м_н_њ_о_п_р_с_т_ћ_у_ф_х_ц_ч_џ_ш_щ_ъ_ы_ь_э_ю_я'.split('_')
var latin = 'A_B_V_G_D_Đ_E_Ë_Ž_Z_I_J_J_K_L_Lj_M_N_Nj_O_P_R_S_T_Ć_U_F_H_C_Č_Dž_Š_Ŝ_ʺ_Y_ʹ_È_Û_Â_a_b_v_g_d_đ_e_ë_ž_z_i_j_j_k_l_lj_m_n_nj_o_p_r_s_t_ć_u_f_h_c_č_dž_š_ŝ_ʺ_y_ʹ_è_û_â'.split('_')
function textNodesUnder(el) {
var n, a = [],
walk = document.createTreeWalker(el, NodeFilter.SHOW_TEXT, {
acceptNode: function(node) {
var temp = node;
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
// Detect IE and append class to <html> element
var UA = navigator.userAgent;
var html = document.documentElement;
if (UA.indexOf("IEMobile") === -1) {
if ((UA.indexOf("rv:11.") !== -1) && (!html.classList.contains('ie11')) && window.navigator.msPointerEnabled) {
html.classList.add("ie11");
} else if ((UA.indexOf("MSIE 10.") !== -1) && (!html.classList.contains('ie10')) && window.navigator.msPointerEnabled) {
html.classList.add("ie10");
}
}