[bknr-cvs] hans changed trunk/projects/quickhoney/website/static/javascript.js
BKNR Commits
bknr at bknr.net
Tue Sep 23 23:20:10 UTC 2008
Revision: 3951
Author: hans
URL: http://bknr.net/trac/changeset/3951
Improve digging.
U trunk/projects/quickhoney/website/static/javascript.js
Modified: trunk/projects/quickhoney/website/static/javascript.js
===================================================================
--- trunk/projects/quickhoney/website/static/javascript.js 2008-09-23 19:27:58 UTC (rev 3950)
+++ trunk/projects/quickhoney/website/static/javascript.js 2008-09-23 23:20:10 UTC (rev 3951)
@@ -1354,7 +1354,7 @@
{ icon: 'digg.png', width: 16, height: 14,
name: 'Digg',
url: 'http://www.digg.com',
- action: 'http://digg.com/submit?phase=2&url=%URL%'},
+ action: 'http://digg.com/submit?phase=2&url=%IMAGEURL%&title=%TITLE%&media=image&topic=design&thumbnails=0'},
{ icon: 'fark.gif', width: 15, height: 18,
name: 'Fark',
url: 'http://www.fark.com'},
@@ -1465,6 +1465,13 @@
return window.location.href.replace("#", "");
}
+function current_image_url()
+{
+ return document.location.protocol
+ + '//' + document.location.host + (document.location.port ? ':' + document.location.port : '')
+ + '/image/' + current_image.name;
+}
+
function make_shout_form() {
function bookmark_link(image, action) {
@@ -1474,6 +1481,7 @@
function submit_bookmark(site) {
var url = site.action;
+ url = url.replace("%IMAGEURL%", encodeURIComponent(current_image_url()));
url = url.replace("%URL%", encodeURIComponent(current_url()));
url = url.replace("%TITLE%", encodeURIComponent(compute_title()));
window.open(url,
More information about the Bknr-cvs
mailing list