diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-17 04:55:37 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-17 04:55:37 +0000 |
commit | 0b9a0eae2bf248fe3b03be16837e20e2c6431224 (patch) | |
tree | 0d6f4ca969a17f71a6ca8c4b78e9d89b9522a4f8 /mod/bookmarks/views/default/bookmarks/js.php | |
parent | 389e05d4d162116e350ec47cdab287fc78f6cfaf (diff) | |
download | elgg-0b9a0eae2bf248fe3b03be16837e20e2c6431224.tar.gz elgg-0b9a0eae2bf248fe3b03be16837e20e2c6431224.tar.bz2 |
Further cleanup of bookmarks. Moved bookmarklet to plugin. Pulled in the 1.7 bookmark pin and made the "Bookmark this page" less ugly. Added js to append the title.
git-svn-id: http://code.elgg.org/elgg/trunk@8273 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/bookmarks/views/default/bookmarks/js.php')
-rw-r--r-- | mod/bookmarks/views/default/bookmarks/js.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mod/bookmarks/views/default/bookmarks/js.php b/mod/bookmarks/views/default/bookmarks/js.php new file mode 100644 index 000000000..35dc82f70 --- /dev/null +++ b/mod/bookmarks/views/default/bookmarks/js.php @@ -0,0 +1,11 @@ +elgg.provide('elgg.bookmarks'); + +elgg.bookmarks.init = function() { + // append the title to the url + var title = document.title; + var e = $('a.elgg-bookmark-page'); + var link = e.attr('href') + '&title=' + encodeURIComponent(title); + e.attr('href', link); +} + +elgg.register_event_handler('init', 'system', elgg.bookmarks.init);
\ No newline at end of file |