Inspiriert von dem Twitter Client "twhirl", habe ich mir ein kleines IE Addon geschrieben, welches eine URL in eine TinyUrl verwandelt.
Beispiel: Aus http://www.netcreate.de/de_home.net wird http://is.gd/3hc4
Das Addon wird per Rechtsklick (Kontextmenü) auf das Browserfenster ausgeführt.
Danach wird folgendes Skript ausgeführt:
<script type="text/javascript" defer> try { var win = window.external.menuArguments; var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); xmlhttp.open('GET', 'http://is.gd/api.php?longurl=' + external.menuArguments.document.URL); xmlhttp.onreadystatechange = handleStateChange; xmlhttp.send(null); function handleStateChange() { win.clipboardData.clearData(); if (xmlhttp.readyState == 4) { alert('URL converted to: ' + xmlhttp.responseText); win.clipboardData.setData("Text",xmlhttp.responseText); xmlhttp.abort(); xmlhttp = null; } } } catch(ex) { alert("tinyurl.js - An Exception occured: " + ex.message); } </script>
Damit das Addon im Kontextmenü des Browsers angezeigt wird, muss folgendes RegFile ausgeführt werden:
Windows Registry Editor Version 5.00 [HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt] [HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt\&Make URL as Tinyurl] @="C:\\Tools\\IE\\tinyurl.js"
Download der beiden Files: hier
Known Issues:
Links:
Ähnliche Beiträge
Kommentar schreiben
Antwort auf Kommentar abbrechen