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);
+ }
+} */
print "<h3>" . __("Firefox Integration") . "</h3>";
print "<p>" . __('This Tiny Tiny RSS site can be used as a Firefox Feed Reader by clicking the link below.');
- print "</p><p class=\"small\"> <a href='javascript:window.navigator.registerContentHandler(" .
+ print "</p><p> <a class='visibleLink' href='javascript:window.navigator.registerContentHandler(" .
"\"application/vnd.mozilla.maybe.feed\", " .
"\"" . add_feed_url() . "\", " . " \"Tiny Tiny RSS\")'>" .
__('Click here to register this site as a feed reader.') . "</a></p>";
set_pref($link, "_PREFS_PUBLISH_KEY", generate_publish_key());
}
- print "<p>".__('Published articles are exported as a public RSS feed and can be subscribed by anyone who knows the address specified below.')."</p>";
+ print "<p>".__('Published articles are exported as a public RSS feed and can be subscribed by anyone who knows the URL specified below.')."</p>";
$url_path = article_publish_url($link);
- print "<p class=\"small\"><a id=\"pubGenAddress\" target=\"_new\" href=\"$url_path\">$url_path</a></p>";
+ print "<p><a class=\"visibleLink\" id=\"pubGenAddress\" target=\"_new\" href=\"$url_path\">Link to published articles feed.</a></p>";
print "<p><input type=\"submit\" onclick=\"return pubRegenKey()\" class=\"button\"
- value=\"".__('Generate another address')."\"></p>";
+ value=\"".__('Generate another link')."\">";
+ /* print " <input type=\"submit\" onclick=\"return pubToClipboard()\" class=\"button\"
+ value=\"".__('Copy link to clipboard')."\">"; */
+ print "</p>";
}
?>
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);
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 {
color : #5050aa;
}
+a.visibleLink {
+ color : gray;
+}
div.topLinks a:hover {
color : gray;
}
+
+a.visibleLink {
+ color : gray;
+}
div.dashboard {
margin-left : 3px;
}
+
+a.visibleLink {
+ color : #4684ff;
+
+}