keyconfig 20110522

Announce and Discuss the Latest Theme and Extension Releases.
Post Reply
ballyhairs
Posts: 63
Joined: May 5th, 2009, 2:44 pm

Re: keyconfig 20080929

Post by ballyhairs »

dorando,
Thanks for replying, I knew you will try something. unfortunately this wasn't a perfect solution :(
I don't even think it works at all, and if it does then it seems to send "Done" to clipboard way earlier than
when it really shows up in the statusbar. I tested it on many web pages fast and slow loading ones.

Is there a way to make it a perfect match with the status bar?

Thanks alot man :)

Here is my ahk script to retrieve it:

Code: Select all

loop, {
   ControlSend , , {ALTDOWN}w{ALTUP}, Firefox
   if clipboard=Done
      {
      MsgBox, Tada!
      Break
      }
   sleep, 200
   }
Return
dorando
Posts: 1203
Joined: January 9th, 2004, 9:57 am
Contact:

Re: keyconfig 20080929

Post by dorando »

If you're calling the shortcut from a loop, just

Code: Select all

var ClipboardHelper = Components.classes["@mozilla.org/widget/clipboardhelper;1"]
.
getService(Components.interfaces.nsIClipboardHelper);

if(!
gBrowser.mIsBusy)
 ClipboardHelper.copyString("Done"); 
should be enough, otherwise try

Code: Select all

var ClipboardHelper = Components.classes["@mozilla.org/widget/clipboardhelper;1"]
.
getService(Components.interfaces.nsIClipboardHelper);

var progressListener = {
 onStateChange: function(aWebProgress, aRequest, aStateFlags, aStatus){
  if(aStateFlags & Ci.nsIWebProgressListener.STATE_STOP && aRequest) {
   gBrowser.removeProgressListener(progressListener);
   ClipboardHelper.copyString("Done");
  }
 },
 onLocationChange: function(){},
 onSecurityChange: function(){},
 onProgressChange: function(){},
 onStatusChange: function(){}
}

if(
gBrowser.mIsBusy)
 gBrowser.addProgressListener(progressListener);
else
 ClipboardHelper.copyString("Done"); 
which might work in conjunction with ClipWait or OnClipboardChange.
ballyhairs
Posts: 63
Joined: May 5th, 2009, 2:44 pm

Re: keyconfig 20080929

Post by ballyhairs »

dorando,

This seemed to work perfect on some sites, but not all, I noticed that while some sites are still loading the word "Done" appears quickly and then "transferring.." shows ups again and the site goes on loading.
Is it possible you make a code that loops when called (So I only need to call it once and it does the looping) and waits for the word "Done" to stick there for 2 or 3 seconds before it confirms that the site is REALLY done loading and then send "Done" to clipboard?

Thanks
User avatar
tonymec
Posts: 734
Joined: October 15th, 2004, 2:58 am
Location: Ixelles (Brussels Capital Region, Belgium)
Contact:

Re: keyconfig 20080929

Post by tonymec »

@ballyhairs:
Maybe you are up against a page with a (redirecting) autorefresh? Then the first page does "load fully" before resending you to a different page. Any redirecting Wikipedia entry would be an example of that. However, the redirecting page may specify a delay: e.g., for non-paying subscribers, when you report a spam to SpamCop there will be first a "wait" page, then after 5 to 10 seconds it will refresh and the full "spam parse" page will appear. On the gmail Webmail page, I don't know what mechanism they use (javascript maybe?) but "Done" appears on a blank page, which then proceeds (several seconds later) to load the Inbox. I'm not sure there is a sure-fire way to determine exactly in all cases "when" the page you're seeing is the "finished product". For some pages there is no real "finished product", e.g. the Tinderbox pages which refresh their "waterfalls" every so-many minutes...
Best regards,
Tony
mad.engineer
Posts: 314
Joined: August 8th, 2006, 4:08 pm

Re: keyconfig 20080929

Post by mad.engineer »

Hi dorando, Can you please update Keyconfig to make it compatible with TB 3.1.2 released today?. Thanks
dorando
Posts: 1203
Joined: January 9th, 2004, 9:57 am
Contact:

Re: keyconfig 20080929

Post by dorando »

Compatibility information has been updated, it might be necessary to click on Tools > Add-ons > Find Updates (which might incorrectly state at the top that "No updates were found" while "A compatibility update has been applied" as stated below the extension name) if the extensions didn't got re-enabled already.

Note that it is possible to disable the compatibility enforcing by adding a boolean 'extensions.checkCompatibility.3.1' through about:config.

ballyhairs wrote:This seemed to work perfect on some sites, but not all, I noticed that while some sites are still loading the word "Done" appears quickly and then "transferring.." shows ups again and the site goes on loading.
Is it possible you make a code that loops when called (So I only need to call it once and it does the looping) and waits for the word "Done" to stick there for 2 or 3 seconds before it confirms that the site is REALLY done loading and then send "Done" to clipboard?
Try

Code: Select all

var ClipboardHelper = Components.classes["@mozilla.org/widget/clipboardhelper;1"]
.
getService(Components.interfaces.nsIClipboardHelper);

var statusbar = document.getElementById("statusbar-display")

if(
gBrowser.mIsBusy)
 statusbar.watch("label", watcher);
else
 ClipboardHelper.copyString("Done");

function watcher(prop, oldval, newval){
 if(newval == "Done") {
  window.clearTimeout(waiter.timeout);
  waiter.timeout = window.setTimeout(waiter,3000);
 }
 return newval;
}

function waiter() {
 statusbar.unwatch("label");
 ClipboardHelper.copyString("Done");
}
 
Hamid_Y2K
Posts: 20
Joined: July 8th, 2010, 4:59 am

Re: keyconfig 20080929

Post by Hamid_Y2K »

plz give me code for "copy link location" and I used ext CoLt code for "copy link text".?
And ext "Abduction!" cod for "save page as image".?
thnx :oops:
dorando
Posts: 1203
Joined: January 9th, 2004, 9:57 am
Contact:

Re: keyconfig 20080929

Post by dorando »

Hamid_Y2K wrote:plz give me code for "copy link location" [...]
Try

Code: Select all

if(XULBrowserWindow.overLink)
 Components.classes["@mozilla.org/widget/clipboardhelper;1"].
 getService(Components.interfaces.nsIClipboardHelper).copyString(XULBrowserWindow.overLink); 
Hamid_Y2K wrote:[...] "copy link text".?
Try

Code: Select all

if(XULBrowserWindow.overLink)
 for (var i = 0, links = content.document.links, l = links.length ; i < l; i++)
  if(links[i].href == XULBrowserWindow.overLink) {
   Components.classes["@mozilla.org/widget/clipboardhelper;1"]
   .getService(Components.interfaces.nsIClipboardHelper)
   .copyString(links[i].text);

   break;
  } 
Hamid_Y2K wrote:And ext "Abduction!" cod for "save page as image".?
File -> Save Page As Image... uses

Code: Select all

abduction(document.popupNode, { notice: 'Save image of:', save: 'Save selection...'  } ); 
sridhar
Posts: 184
Joined: June 18th, 2004, 2:54 pm
Contact:

Re: keyconfig 20080929

Post by sridhar »

The following code for tagging the page in delicious is no longer working for me:

Code: Select all

deliciousMain.loadTagPage();


Can you please give me the updated one?
dorando
Posts: 1203
Joined: January 9th, 2004, 9:57 am
Contact:

Re: keyconfig 20080929

Post by dorando »

Try

Code: Select all

yAddBookMark.open(); 
sridhar
Posts: 184
Joined: June 18th, 2004, 2:54 pm
Contact:

Re: keyconfig 20080929

Post by sridhar »

dorando wrote:Try

Code: Select all

yAddBookMark.open(); 


Works. Thank you.
grool
Posts: 27
Joined: September 12th, 2006, 9:31 am

Re: keyconfig 20080929

Post by grool »

Hi everybody,

I just want to ask if the compatibility is really updated, because FF 3.6.8 broke my keyconfig (not even compatibility update) when I moved profiles to a new Windows 7 system. I also made the new boolean entry in about:config, but to no avail.

Image

what else can i do? It seems Win7 keeps its stuff in places I'm not familiar with. Could that be the reason? I followed Mozilla's guide with the profiles folder and stuff.

Thx for reading.
sridhar
Posts: 184
Joined: June 18th, 2004, 2:54 pm
Contact:

Re: keyconfig 20080929

Post by sridhar »

@grool: I use http://www.mrtech.com/extensions/local_install/ to force compatibility of add-ons like keyconfig and they work fine. You might want to give it a try.
User avatar
tonymec
Posts: 734
Joined: October 15th, 2004, 2:58 am
Location: Ixelles (Brussels Capital Region, Belgium)
Contact:

Re: keyconfig 20080929

Post by tonymec »

grool: the pref name has recently been changed. See http://kb.mozillazine.org/Extensions.checkCompatibility#Background for details.
Best regards,
Tony
Iceweasel
Posts: 39
Joined: April 9th, 2008, 9:41 am
Location: Scotland

Re: keyconfig 20080929

Post by Iceweasel »

I created a function which hides/unhides tool and tab bars. I use this in situations where I need to save screen real estate to fit multiple windows on screen.

The function works perfectly but the situation I mainly need it for is when I have a flash application loaded. The flash application filters the key strokes and I am stuffed because I can't use the function to unhide menu and tab bar. These situations are time critical and I can't afford to lose time, which is why I created the function.

Is there anything I can do?
Soar Alba
Post Reply