Binary files releases/unplug-2.003/source/chrome/content/.overlay.js.swp and releases/unplug-2.010/source/chrome/content/.overlay.js.swp differ
diff --new-file --recursive --suppress-common-lines --exclude changes.txt --exclude diff.txt releases/unplug-2.003/source/chrome/content/common.js releases/unplug-2.010/source/chrome/content/common.js
135c135
< version : 2.003,
---
> version : 2.010,
139c139
< revision : 200904110041,
---
> revision : 200904131733,
diff --new-file --recursive --suppress-common-lines --exclude changes.txt --exclude diff.txt releases/unplug-2.003/source/chrome/content/config.js releases/unplug-2.010/source/chrome/content/config.js
115c115
< tb.selectedIndex = 4;
---
> tb.selectedIndex = 3;
120c120
< case "open":
---
> case "downloader":
123,125d122
< case "dl":
< tb.selectedIndex = 2;
< break;
diff --new-file --recursive --suppress-common-lines --exclude changes.txt --exclude diff.txt releases/unplug-2.003/source/chrome/content/config.xul releases/unplug-2.010/source/chrome/content/config.xul
32d31
<
67,79d65
<
<
<
<
<
<
<
<
<
<
<
<
<
85a72
>
diff --new-file --recursive --suppress-common-lines --exclude changes.txt --exclude diff.txt releases/unplug-2.003/source/chrome/content/overlay.js releases/unplug-2.010/source/chrome/content/overlay.js
46c46,52
< var data = { tgt_window : this.get_current_window(), gbrowser : getBrowser() };
---
> var data = {
> // window of document to examine
> "tgt_window" : this.get_current_window(),
> // gBrowser element
> "gbrowser" : getBrowser(),
> // global namespace (contains gFlashGotService, etc)
> "gwindow" : window };
diff --new-file --recursive --suppress-common-lines --exclude changes.txt --exclude diff.txt releases/unplug-2.003/source/chrome/content/rules.xml releases/unplug-2.010/source/chrome/content/rules.xml
43,45c43,46
<
<
<
---
>
>
>
>
152c153
< veohplayer\.swf
---
> veoh\.com.*\.swf
210a212,215
>
>
>
>
490a496,503
>
>
>
> ^(details\.html.*)$
>
>
>
>
diff --new-file --recursive --suppress-common-lines --exclude changes.txt --exclude diff.txt releases/unplug-2.003/source/chrome/content/search.js releases/unplug-2.010/source/chrome/content/search.js
395,489d394
<
<
< /**
< * This gets sent to UnPlug2SearchPage (or whatever the callback is set as)
< * and holds interesting information about the result
< */
< function UnPlug2Result(nsiuri, post_data, media_type_hint, description, thumbnailurl, title, trace) {
< this.url = nsiuri.spec;
< this.post_data = post_data;
< this.media_type_hint = media_type_hint;
< this.description = description;
< this.thumbnailurl = thumbnailurl;
< this.title = title;
< try {
< this.host = nsiuri.host;
< } catch(e) {
< // rtmp links don't have a host (bacause difference between nsiuri and nsiurl?
< this.host = null;
< }
< this.protocol = nsiuri.scheme;
< this.trace = trace;
< }
< UnPlug2Result.prototype = {
< /**
< * TODO - remove this function in favor of those below
< *
< * Returns an object which contains information about how the result can be used
< * This information can help us enable/disable the buttons
< *
< * link is completely represented by this.url. So can (for example) cut+paste into email or drag+dropped into bookmarks
< * media can be opened in a media player just by giving it this.url. So this is only set if link is also set.
< * browser can be opened in a web browser (ie is http, https, gopher, ftp, ...). This CAN have post data, so you might also need to check link
< * http is http or https
< */
< usage : function () {
< switch (this.protocol) {
< case "http":
< case "https":
< if (this.post)
< return { browser : true, http : true }
< return { browser : true, link : true, http : true, media: true }
< case "gopher":
< case "ftp":
< return { browser : true, link : true, media: true }
< case "mms":
< return { link : true, media: true }
< case "rtmp":
< // Real-Time Messagine Protocol - for flash!
< // Media=True because VLC can handle it. Fuck yeah!
< return { link : true, media: true }
< default:
< return {};
< }
< },
<
< /*
< * Is completely represented by a simple link
< */
< is_link : function () {
< if (this.post_data)
< return false;
< return true;
< },
<
< /**
< * returns information about any unplug-native downloaders (eg iplayer downloader)
< * There aren't any of these yet :)
< */
< has_special_downloader : function () {
< return null;
< },
<
< toString : function () {
< return '';
< },
<
< /**
< * returns an array of css classes for the widget
< */
< cssclasses : function () {
< if (this._is_swf())
< return ["swf"];
< return [];
< },
<
< _is_swf : function () {
< return Boolean(this.url.indexOf(".swf") >= 0);
< },
<
< end_of_object : 1 }
<
<
<
<
<
827a733
> // get url
832c738,754
< var result = new UnPlug2Result(
---
>
> // get download method
> var download_method = { "url" : abs_url.spec }
> if (node.hasAttribute("post")) {
> download_method = {
> "http_post" : [
> abs_url.spec,
> updated_variables.subst(node.getAttribute("post"))
> ]
> };
> }
> if (node.hasAttribute("referer")) {
> download_method.referer = updated_variables.subst_optional(node.getAttribute("referer")) || undefined;
> }
>
> // make response
> var result = UnPlug2Search._make_response_object_result(
834c756
< updated_variables.subst_optional(node.getAttribute("post")),
---
> download_method,
838,840c760,762
< UnPlug2Search.get_name(abs_url.spec),
< updated_variables.trace()
< )
---
> updated_variables.trace());
>
> // callback
853a776,820
> * Return an unplug result object, for passing to the callback
> * The format is JSON-compatible
> *
> * Download method must be a javascrit object. It's used by download components (eg "copy url", "save with firefox", "save with dta", etc) to decide how and if they work. Examples below:
> * { "link" : url }
> * for basic urls
> * { "link" : url, "referer" : referer }.
> * urls with referer. The referer attribute will be ignored by components which don't support it.
> * { "http_post" : [ url, post_data ] }
> * http post request
> *
> * Download can be used to track duplicate results
> */
> _make_response_object_result : function (nsiuri, download_method, file_ext, description, thumbnailurl, trace) {
> var name = UnPlug2Search.get_name(nsiuri.spec);
> var result_object = {
> "type" : "result",
> "details" : {
> "name" : name || "(no name!)",
> "url" : nsiuri.spec, // this is used for advice only (not used for downloading)
> "swf" : (nsiuri.path.indexOf(".swf") >= 0) ? true : false,
> "trace" : trace || "TRACE!?" },
> "download" : download_method };
>
> // details section ( { "label" : undefined } has odd results, so assign here )
> if (description)
> result_object.details.description = description;
> if (file_ext)
> result_object.details.file_ext = file_ext;
> if (thumbnailurl)
> result_object.details.thumbnail = thumbnailurl;
> try {
> result_object.details.protocol = nsiuri.scheme
> } catch (e) {
> // probably will never fail
> }
> try {
> result_object.details.host = nsiuri.host
> } catch (e) {
> // fails for rtmp links (difference between nsIURI and nsIURL?)
> }
> return result_object;
> },
>
> /**
diff --new-file --recursive --suppress-common-lines --exclude changes.txt --exclude diff.txt releases/unplug-2.003/source/chrome/content/searchpage.js releases/unplug-2.010/source/chrome/content/searchpage.js
32c32
< // parent window's getBrowser()
---
> // parent window's getBrowser() and global window namespace
33a34
> this._gwindow = args.gwindow;
43,53d43
< // capabilities - what can we do
< this.capabilities = {};
< this.capabilities['downthemall'] = (
< UnPlug2.get_root_pref("extensions.{DDC359D1-844A-42a7-9AA1-88A850A938A8}.description")
< ? true : false )
< this.capabilities['flashgot'] = (
< UnPlug2.get_root_pref("extensions.{19503e42-ca3c-4c27-b1e2-9cdb2170ee34}.description")
< ? true : false )
< this.capabilities['opener'] = UnPlug2.get_pref("opener");
< this.capabilities['downloader'] = UnPlug2.get_pref("downloader");
<
61c51,52
< UnPlug2.log("Capabilities: " + this.capabilities.toSource())
---
> // results array to be populated when a callback occurs
> this.results = [];
114,120c105,112
< drag_and_drop_observer : {
< onDragStart: function (e, transferData, action) {
< var url = e.target.getAttribute("url");
< transferData.data = new TransferData();
< transferData.data.addDataForFlavour("text/unicode", url);
< /* transferData.data.addDataForFlavour("text/html", url); */
< }
---
> drag_and_drop_observer : function (url) {
> return {
> onDragStart: function (e, transferData, action) {
> transferData.data = new TransferData();
> transferData.data.addDataForFlavour("text/unicode", url);
> /* transferData.data.addDataForFlavour("text/html", url); */
> }
> };
128c120,140
< UnPlug2.log("FOUND: " + result.url + " from " + result.trace);
---
> UnPlug2.log("FOUND: " + result.toSource());
> if (result.type != "result") {
> UnPlug2.log("Callback function got a " + result.type + " (not a result)!");
> return;
> }
>
> for (var i = 0; i < UnPlug2SearchPage.results.length; i++) {
> // JavaScript being retarded here:
> // {"X" : "Y"} == {"X" : "Y"} -> false
> // So convert to source strings and compare to give the correct damned answer!
> if (UnPlug2SearchPage.results[i].download.toSource() === result.download.toSource()) {
> var old_result_widget = document.getElementById("result_" + i);
> old_result_widget.addDuplicate(result);
> return;
> }
> }
>
> // add this result
> var new_result_index = UnPlug2SearchPage.results.length;
> UnPlug2SearchPage.results[new_result_index] = result;
>
131,138d142
< reselem.setAttribute("url", result.url);
< reselem.setAttribute("type", result.media_type_hint || "");
< reselem.setAttribute("title", result.title || "No title");
< reselem.setAttribute("description", result.description || "");
< reselem.setAttribute("thumbnail", result.thumbnailurl || "");
< reselem.setAttribute("url_host", result.host || "");
< reselem.setAttribute("url_protocol", result.protocol || "");
< reselem.setAttribute("class", result.cssclasses().join(" "));
140c144,155
< if (result.is_link()) {
---
> // add an id so we can edit this item later
> reselem.setAttribute("id", "result_" + new_result_index);
> reselem.setAttribute("reference", new_result_index);
>
> // change css classes in some circumstances
> // TODO -- improve css styling code
> if (result.details.swf) {
> reselem.className = "swf";
> }
>
> // make draggable if simple url only
> if (result.download.url) {
142c157
< nsDragAndDrop.startDrag(e, UnPlug2SearchPage.drag_and_drop_observer);
---
> nsDragAndDrop.startDrag(e, UnPlug2SearchPage.drag_and_drop_observer(result.download.url));
145,148d159
<
< document.getElementById("results").appendChild(reselem);
< reselem.setDownloaders(UnPlug2SearchPage.capabilities, result);
< reselem.setOpeners(UnPlug2SearchPage.capabilities, result);
150,159c161,171
< var duplicate_elem = reselem.checkDuplicates(reselem.parentNode);
< if (duplicate_elem) {
< UnPlug2.log("Duplicate element");
< if (!UnPlug2.get_pref("show_duplicates", false)) {
< var things_to_copy = ["thumbnail", "description"];
< for (var j=0; j < things_to_copy.length; j++) {
< duplicate_elem.setAttribute(things_to_copy[j], duplicate_elem.getAttribute(things_to_copy[j]) || reselem.getAttribute(things_to_copy[j]));
< }
< reselem.parentNode.removeChild(reselem);
< }
---
> var preferred_downloaders;
> switch (UnPlug2.get_pref("downloader")) {
> case "saveas":
> preferred_downloaders = ["saveas"];
> break;
> case "openover":
> preferred_downloaders = ["openover"];
> break;
> default:
> preferred_downloaders = ["downthemall", "flashgot", "saveas"];
> break;
160a173,178
>
> // hide before and show after calling init
> reselem.collapsed = true;
> document.getElementById("results").appendChild(reselem);
> reselem.initResult(result, preferred_downloaders);
> reselem.collapsed = false;
170,218d187
< open_new_window : function (reselem) {
< try {
< window.open(reselem.getAttribute("url"));
< } catch(e) {
< UnPlug2.log("newwin " + e);
< }
< },
<
< open_new_tab : function (reselem) {
< try {
< var t = UnPlug2SearchPage._gbrowser.addTab(reselem.getAttribute("url"));
< UnPlug2SearchPage._gbrowser.selectedTab = t;
< } catch(e) {
< UnPlug2.log("newtab " + e);
< }
< },
<
< open_over_window : function (reselem) {
< try {
< UnPlug2SearchPage._win.location = reselem.getAttribute("url");
< } catch(e) {
< UnPlug2.log("overwin " + e);
< }
< },
<
< copy_url : function (reselem) {
< try {
< UnPlug2SearchPage._clipboard.copyString(reselem.getAttribute("url"));
< } catch(e) {
< UnPlug2.log("copyurl " + e);
< }
< },
<
< download_saveas : function (reselem) {
< try {
< var source_url = reselem.getAttribute("url");
< var file = UnPlug2SearchPage._save_as_box(reselem.getAttribute("title"), reselem.getAttribute("type"));
< if (!file)
< return;
<
< if (false)
< UnPlug2SearchPage._download_with_downloadmgr(source_url, file.file);
< UnPlug2SearchPage._download_ff2_version(source_url, file.fileURL);
< } catch(e) {
< UnPlug2.log("saveas " + e);
< alert("saveas " + e);
< }
< },
<
222a192,200
> var nsireferer = nsiurl;
> try {
> // TODO - fix this to use the referer from result.download.referer, if avail
> nsireferer = Components.classes["@mozilla.org/network/io-service;1"].
> getService(Components.interfaces.nsIIOService).
> newURI(String(UnPlug2SearchPage._win.location), null, null);
> } catch(e) {
> // pass
> }
249,250c227
< var aReferrer = persistArgs.source;
< persist.saveURI(persistArgs.source, null, aReferrer, persistArgs.postData, null, persistArgs.target);
---
> persist.saveURI(persistArgs.source, null, nsireferer, persistArgs.postData, null, persistArgs.target);
389a367,485
> /*
> * For callbacks from unplug_result button presses
> */
> widgets : {
> "copyurl" : {
> avail : function (res) { return (res.download.url ? true : false); },
> exec : function (res, data) {
> UnPlug2SearchPage._clipboard.copyString(result.download.url);
> }
> },
> "saveas" : {
> avail : function (res) { return (res.download.url ? true : false); },
> exec : function (res, data) {
> var file = UnPlug2SearchPage._save_as_box(res.details.name, res.details.file_ext);
> if (!file)
> return;
>
> if (false)
> UnPlug2SearchPage._download_with_downloadmgr(res.download.url, file.file);
>
> UnPlug2SearchPage._download_ff2_version(res.download.url, file.fileURL);
> }
> },
> "opentab" : {
> avail : function (res) { return (res.download.url ? true : false); },
> exec : function (res, data) {
> var t = UnPlug2SearchPage._gbrowser.addTab(res.download.url);
> UnPlug2SearchPage._gbrowser.selectedTab = t;
> }
> },
> "opennew" : {
> avail : function (res) { return (res.download.url ? true : false); },
> exec : function (res, data) {
> window.open(res.download.url);
> }
> },
> "openover" : {
> avail : function (res) { return (res.download.url ? true : false); },
> exec : function (res, data) {
> UnPlug2SearchPage._win.location = res.download.url;
> }
> },
> "downthemall" : {
> avail : function (res) {
> if (!UnPlug2.get_root_pref("extensions.{DDC359D1-844A-42a7-9AA1-88A850A938A8}.description")) {
> return false;
> }
> if (res.download.url) {
> return true;
> }
> return false;
> },
> exec : function (res, data) {
> var url = res.download.url;
> var post = null;
> /*
> post didn't seem to work
> if (res.download.http_post) {
> url = res.download.http_post[0];
> post = res.download.http_post[1];
> }
> */
> window.opener.DTA_AddingFunctions.saveSingleLink(
> false, //turbo
> url, //url
> res.download.referer || String(UnPlug2SearchPage._win.location), // referer
> res.details.name, // description
> post) // post data
> }
> },
> "flashgot" : {
> avail : function (res) {
> if (UnPlug2SearchPage._gwindow && UnPlug2SearchPage._gwindow.gFlashGotService) {
> // flashgot installed
> return (res.download.url ? true : false);
> } else {
> // flashgot not installed
> return false;
> }
> },
> exec : function (res, data) {
> var fg = UnPlug2SearchPage._gwindow.gFlashGotService;
> fg.download([res.download.url], fg.OP_ONE);
> }
> },
> "fallback" : {
> avail : function (res) { return true; },
> exec : function (res, data) {
> alert("No default downloader is available");
> }
> },
> "config" : {
> avail : function (res) { return true; },
> exec : function (res, data) {
> UnPlug2SearchPage.configure(data);
> }
> }
> },
>
> widgetresponse : function (reference, widgetname, widgetdata) {
> try {
> var result = this.results[reference];
> if (!UnPlug2SearchPage.widgets[widgetname].avail(result)) {
> throw ("Widget " + widgetname + " not available for result " + result.toSource());
> }
> UnPlug2SearchPage.widgets[widgetname].exec(result, widgetdata);
> } catch(e) {
> UnPlug2.log("widgetresponse: " + e);
> }
> },
>
> widgetavailable : function (result, widgetname) {
> try {
> return UnPlug2SearchPage.widgets[widgetname].avail(result);
> } catch(e) {
> UnPlug2.log("widgetavailable: " + e);
> }
> },
>
396a493,494
>
>
diff --new-file --recursive --suppress-common-lines --exclude changes.txt --exclude diff.txt releases/unplug-2.003/source/chrome/content/widgets/unplug_result.xbl releases/unplug-2.010/source/chrome/content/widgets/unplug_result.xbl
5,6d4
<
<
12,25d9
<
<
<
<
<
<
<
<
28c12,22
< // pass
---
> callback = (function (evt, responsename, responsedata) {
> var reference;
> var unplug_result_element = document.getBindingParent(evt.target);
> try {
> reference = unplug_result_element.getAttribute("reference");
> UnPlug2SearchPage.widgetresponse(reference, responsename, responsedata);
> } catch(e) {
> // pass
> }
> evt.stopPropagation();
> });
30,32c24,26
<
<
<
---
>
>
>
34,40c28,104
< // if the result isn't completely described by a link, disable this option
< // as it only considers links at the moment
< if (!res.is_link()) {
< var open_btn = document.getAnonymousElementByAttribute(this, "id", "open");
< open_btn.disabled = true;
< return;
< }
---
> /*
> * Set up the item
> * TODO - remove capabilities from here (use widgetavailable instead)
> */
> var that = this;
> var getelem = (function(elem_id) {
> return document.getAnonymousElementByAttribute(that, "id", elem_id);
> });
> var setattr = (function(elem_id, attr_name, attr_value) {
> getelem(elem_id).setAttribute(attr_name, attr_value);
> });
> var isavailable = (function(widgetname) {
> return UnPlug2SearchPage.widgetavailable(result, widgetname);
> });
> var hideifnotavail = (function(elem_id, widgetname) {
> if (isavailable(widgetname)) {
> getelem(elem_id).style.display = "block";
> } else {
> getelem(elem_id).style.display = "none";
> }
> });
> var disableifnotavail = (function(elem_id, widgetname) {
> if (isavailable(widgetname)) {
> setattr(elem_id, "disabled", false);
> } else {
> setattr(elem_id, "disabled", true);
> }
> });
> var set_default_downloader = (function () {
> // set the default value for the download button
> preferred_downloaders = preferred_downloaders || [];
> preferred_downloaders.push("fallback");
> for (var i = 0; i < preferred_downloaders.length; i++) {
> switch (preferred_downloaders[i]) {
> case "fallback":
> if (true) {
> setattr("dl", "oncommand", "callback(event, 'fallback', null)");
> setattr("dl", "tooltiptext", "&dl.nodefault.tooltip;");
> getelem("dl").className = "fallback";
> return;
> }
> break;
> case "saveas":
> if (isavailable("saveas")) {
> setattr("dl", "oncommand", "callback(event, 'saveas', null)");
> setattr("dl", "tooltiptext", "&dl.saveas.tooltip;");
> getelem("dl").className = "saveas";
> return;
> }
> break;
> case "downthemall":
> if (isavailable("downthemall")) {
> setattr("dl", "oncommand", "callback(event, 'downthemall', null)");
> setattr("dl", "tooltiptext", "&dl.dta.tooltip;");
> getelem("dl").className = "dta";
> return;
> }
> break;
> case "flashgot":
> if (isavailable("flashgot")) {
> setattr("dl", "oncommand", "callback(event, 'flashgot', null)");
> setattr("dl", "tooltiptext", "&dl.flashgot.tooltip;");
> getelem("dl").className = "flashgot";
> return;
> }
> break;
> case "openover":
> if (isavailable("openover")) {
> setattr("dl", "oncommand", "callback(event, 'openover', null)");
> setattr("dl", "tooltiptext", "&open.over.tooltip;");
> getelem("dl").className = "openover";
> return;
> }
> break;
> }
> }
> });
42,44c106,107
< // set this to be the default menu item (the element)
< var default_open = document.getAnonymousElementByAttribute(this, "id", "open_tab");
< var change_text = false;
---
> // debug
> setattr("contentbox", "tooltiptext", result.download.toSource() + "\n" + result.details.trace);
46,60c109,113
< switch (caps['opener']) {
< case "tab":
< default_open = document.getAnonymousElementByAttribute(this, "id", "open_tab");
< break;
< case "new":
< default_open = document.getAnonymousElementByAttribute(this, "id", "open_new");
< break;
< case "over":
< default_open = document.getAnonymousElementByAttribute(this, "id", "open_over");
< break;
< case "copyurl":
< default_open = document.getAnonymousElementByAttribute(this, "id", "copy_url");
< change_text = true;
< break;
< }
---
> // basic information
> setattr("name", "value", result.details.name);
> setattr("host", "value", result.details.host);
> setattr("protocol", "value", result.details.protocol);
> setattr("description", "value", result.details.description);
62,68c115,118
< // set the button
< var open_btn = document.getAnonymousElementByAttribute(this, "id", "open")
< open_btn.setAttribute("oncommand", default_open.getAttribute("oncommand"));
< open_btn.setAttribute("tooltiptext", default_open.getAttribute("tooltiptext"));
< open_btn.setAttribute("class", default_open.getAttribute("class"));
< if (change_text) {
< open_btn.setAttribute("label", default_open.getAttribute("label"));
---
> // thumbnail
> if (result.details.thumbnail) {
> setattr("thumbnail", "src", result.details.thumbnail);
> setattr("thumbnail", "tooltiptext", result.details.thumbnail);
70c120,135
< default_open.style.fontWeight = "bold";
---
>
> // copy url
> disableifnotavail("copyurl", "copyurl");
>
> // openers
> disableifnotavail("open_tab", "opentab");
> disableifnotavail("open_new", "opennew");
> disableifnotavail("open_over", "openover");
>
> // downloaders
> disableifnotavail("dl_saveas", "saveas");
> disableifnotavail("dl_dta", "downthemall");
> disableifnotavail("dl_flashgot", "flashgot");
>
> // det default downloader on dl button
> set_default_downloader();
73,75c138,139
<
<
<
---
>
>
77,82c141,147
< // if the result isn't completely described by a link, disable this option
< // as it only considers links at the moment and only http/https links at that :(
< if (!res.is_link() || (res.protocol != "http" && res.protocol != "https")) {
< var dl_btn = document.getAnonymousElementByAttribute(this, "id", "dl");
< dl_btn.disabled = true;
< return;
---
> /*
> * Duplicates are downloaded in the same way, but may have different
> * details associated with them.
> */
> var that = this;
> var getelem = function(elem_id) {
> return document.getAnonymousElementByAttribute(that, "id", elem_id);
84,91c149,150
<
< // set this to be the default menu item (the element)
< var default_dl = document.getAnonymousElementByAttribute(this, "id", "dl_saveas")
<
< if (caps['flashgot']) {
< var el = document.getAnonymousElementByAttribute(this, "id", "dl_flashgot")
< el.style.display = "block";
< default_dl = el;
---
> var getattr = function(elem_id, attr_name) {
> return getelem(elem_id).getAttribute(attr_name);
93,97c152,153
<
< if (caps['downthemall']) {
< var el = document.getAnonymousElementByAttribute(this, "id", "dl_dta")
< el.style.display = "block";
< default_dl = el;
---
> var setattr = function(elem_id, attr_name, attr_value) {
> getelem(elem_id).setAttribute(attr_name, attr_value);
100,101c156,161
< if (caps['downloader'] == "saveas") {
< default_dl = document.getAnonymousElementByAttribute(this, "id", "dl_saveas")
---
> // debug
> setattr("contentbox", "tooltiptext", getattr("contentbox", "tooltiptext") + "\n" + result.details.trace);
>
> // basic information
> if (result.details.description) {
> setattr("description", "value", result.details.description);
104,125c164,167
< // set the button
< var dl_btn = document.getAnonymousElementByAttribute(this, "id", "dl")
< dl_btn.setAttribute("oncommand", default_dl.getAttribute("oncommand"));
< dl_btn.setAttribute("tooltiptext", default_dl.getAttribute("tooltiptext"));
< dl_btn.setAttribute("class", default_dl.getAttribute("class"));
< default_dl.style.fontWeight = "bold";
<