diff --git a/functions.js b/functions.js index b41cd73ab..2857072b7 100644 --- a/functions.js +++ b/functions.js @@ -1750,3 +1750,48 @@ function displayHelpInfobox(topic_id) { return false; } + +// http://www.dynamic-tools.net/toolbox/copyToClipboard/ + +/* +function copyToClipboard(s) +{ + if( window.clipboardData && clipboardData.setData ) + { + clipboardData.setData("Text", s); + } + else + { + // You have to sign the code to enable this or allow the action in about:config by changing + user_pref("signed.applets.codebase_principal_support", true); + netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); + + var clip Components.classes['@mozilla.org/widget/clipboard;[[[[1]]]]'].createInstance(Components.interfaces.nsIClipboard); + if (!clip) return; + + // create a transferable + var trans = Components.classes['@mozilla.org/widget/transferable;[[[[1]]]]'].createInstance(Components.interfaces.nsITransferable); + if (!trans) return; + + // specify the data we wish to handle. Plaintext in this case. + trans.addDataFlavor('text/unicode'); + + // To get the data from the transferable we need two new objects + var str = new Object(); + var len = new Object(); + + var str = Components.classes["@mozilla.org/supports-string;[[[[1]]]]"].createInstance(Components.interfaces.nsISupportsString); + + var copytext=meintext; + + str.data=copytext; + + trans.setTransferData("text/unicode",str,copytext.length*[[[[2]]]]); + + var clipid=Components.interfaces.nsIClipboard; + + if (!clip) return false; + + clip.setData(trans,null,clipid.kGlobalClipboard); + } +} */ diff --git a/modules/pref-feeds.php b/modules/pref-feeds.php index 854ca0dc2..9b718ace6 100644 --- a/modules/pref-feeds.php +++ b/modules/pref-feeds.php @@ -1073,7 +1073,7 @@ print "
" . __('This Tiny Tiny RSS site can be used as a Firefox Feed Reader by clicking the link below.'); - print "
" . __('Click here to register this site as a feed reader.') . "
"; @@ -1085,14 +1085,17 @@ set_pref($link, "_PREFS_PUBLISH_KEY", generate_publish_key()); } - print "".__('Published articles are exported as a public RSS feed and can be subscribed by anyone who knows the address specified below.')."
"; + print "".__('Published articles are exported as a public RSS feed and can be subscribed by anyone who knows the URL specified below.')."
"; $url_path = article_publish_url($link); - print ""; + print ""; print ""; + value=\"".__('Generate another link')."\">"; + /* print " "; */ + print ""; } ?> diff --git a/prefs.js b/prefs.js index 56de40ad3..43a554cf2 100644 --- a/prefs.js +++ b/prefs.js @@ -37,17 +37,17 @@ function replace_pubkey_callback() { if (new_link) { link.href = new_link.firstChild.nodeValue; - link.innerHTML = new_link.firstChild.nodeValue; + //link.innerHTML = new_link.firstChild.nodeValue; new Effect.Highlight(link); - notify_info("Address changed."); + notify_info("Published feed URL changed."); } else { - notify_error("Could not change address."); + notify_error("Could not change feed URL."); } } else { - notify_error("Could not change address."); + notify_error("Could not change feed URL."); } } catch (e) { exception_error("replace_pubkey_callback", e); @@ -1815,6 +1815,25 @@ function pubRegenKey() { return false; } +function pubToClipboard() { + + try { + + if (!xmlhttp_ready(xmlhttp)) { + printLockingError(); + return false; + } + + var link = document.getElementById("pubGenAddress"); + alert(link.href); + + } catch (e) { + exception_error("pubToClipboard", e); + } + + return false; +} + function validatePrefsSave() { try { diff --git a/themes/compat/theme.css b/themes/compat/theme.css index ef6cf14cc..fcda0b431 100644 --- a/themes/compat/theme.css +++ b/themes/compat/theme.css @@ -950,3 +950,6 @@ div.infoBoxContents a { color : #5050aa; } +a.visibleLink { + color : gray; +} diff --git a/themes/graycube/theme.css b/themes/graycube/theme.css index fd9b24e35..8eacb1286 100644 --- a/themes/graycube/theme.css +++ b/themes/graycube/theme.css @@ -466,3 +466,7 @@ div.topLinks a { div.topLinks a:hover { color : gray; } + +a.visibleLink { + color : gray; +} diff --git a/tt-rss.css b/tt-rss.css index 60448d7da..77b0df74d 100644 --- a/tt-rss.css +++ b/tt-rss.css @@ -1737,3 +1737,8 @@ div.topLinks a.feedback { div.dashboard { margin-left : 3px; } + +a.visibleLink { + color : #4684ff; + +}