官方的文件库

从你的网站生成安全的短链接。目前的版本是1.0.

如果你正在寻找一种简单的方法在你的网页上添加短链接或JavaScript窗口小部件以缩短链接参见工具.

下载

您可以在 here下载jQuery文件库.

范例

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
<script src="/static/download/jsafe.mn.js" type="text/javascript"></script>
<script type="text/javascript">
 $.safeLinks.shorten("http://www.reviews-web-hosting.com/", function(original, short) {
 $('#result').html($('#result').html() + "Short: " + short + "\n");
 }, function(original, message) {
 alert("Error while shortening " + original + ": " + message);
 });
 $.safeLinks.expand("http://safe.mn/d", function(original, long) {
 $('#result').html($('#result').html() + "Long: " + long + "\n");
 }, function(original, message) {
 alert("Error while expanding " + original + ": " + message);
 });
 $.safeLinks.info("http://safe.mn/d", function(original, data) {
 $('#result').html($('#result').html() + "Clicks: " + data.clicks + "\n");
 }, function(original, message) {
 alert("No info for " + original + ": " + message);
 });
</script>

输出