Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash -e
#
# Copyright 2014 Tony Burns
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
function ydntt(o){
var out = document.getElementById('results'),
cpy = document.getElementById('copy'),
html = '',
disp = '',
n,i,j;
for(i=0,j=o.length;i<j;i++){
n = o[i].n.replace('}','</a>');
n = n.replace('{','<a href="'+o[i].u+'">');
html+='<li>'+n+'</li>';