5 ms·
After I saw this, I had to make something like it that's completely contained in the uri itself.. :D data:text/html;,<textarea id="txt" cols=80 rows=24>hello t
by residualmind 13y ago
After I saw this, I had to make something like it that's completely contained in the uri itself.. :D
data:text/html;,<textarea id="txt" cols=80 rows=24>hello there</textarea><br><input value="get link" type=button onclick="(function(){document.location.href=(document.location.href.replace(/24\>.*<\/textarea>/,'24>'+document.getElementById('txt').value+'</textarea>')); }())">
- habosa 13y agoThis could be combined with whatever algorithm is being used on Shortly. This still needs the Shortly website for decoding ... your method would allow the embedding of the encoding/decoding function in the link itself which is more interesting imo. The added length of some obfuscated JavaScript will be very small compared to large-content links.
- residualmind 13y agoNow in Base64, which makes the link longer, but is in most modern browsers... I should really get back to work, this is just too much fun. data:text/html;base64,PHRleHRhcmVhIGlkPSJ0eHQiIGNvbHM9ODAgcm9 3cz0yND47byk8L3RleHRhcmVhPjxicj48aW5wdXQgdmFsdWU9ImdldCBsaW5r IiB0eXBlPWJ1dHRvbiBvbmNsaWNrPSIoZnVuY3Rpb24oKXtkb2N1bWVudC5sb 2NhdGlvbi5ocmVmPSdkYXRhOnRleHQvaHRtbDtiYXNlNjQsJysod2luZG93Lm J0b2Eod2luZG93LmF0b2IoZG9jdW1lbnQubG9jYXRpb24uaHJlZi5zdWJzdHI oMjIpKS5yZXBsYWNlKC8yNFw+Lio8XC90ZXh0YXJlYT4vLCcyND4nK2RvY3Vt ZW50LmdldEVsZW1lbnRCeUlkKCd0eHQnKS52YWx1ZSsnJmx0Oy90ZXh0YXJlY SZndDsnKSkpfSgpKSI+
- habosa 13y agoThis is awesome, that's exactly what I was talking about. This is truly "serverless" whereas Shortly is not. Also if the creator of Shortly is reading my comments, I apologize for the negativity I was mostly just thinking out loud. Kudos to you for making something interesting and putting it out there.
- residualmind 13y agoI fixed and cleaned it up a little. Put it into tinyurl, just to be able to post it here properly (reload once after clicking) http://tinyurl.com/cu3zcjy http://tinyurl.com/cu3zcjy