• Print

Author Topic: The issue of code pasting into a single line in Firefox is a Firefox bug [fixed]  (Read 12356 times)

ng

  • Guest
Re: The issue of code pasting into a single line in Firefox is a Firefox bug
« Reply #75 on: September 20, 2010, 02:02:39 am »
sorry: "tough" instead of "though" (kinda freudian slip)

codeguy

  • Hero Member
  • *****
  • Posts: 3824
  • what the h3ll did i name that code?
    • stuff at dkm
Re: The issue of code pasting into a single line in Firefox is a Firefox bug
« Reply #76 on: September 20, 2010, 02:18:21 am »
are xpi's the same in win and linux? i'm trying to find out if why it didn't work was the wrong OS.
http://denteddisk.forums-free.com/make-an-appointment-with-the-resident-code-guru-f34.html

ng

  • Guest
Re: The issue of code pasting into a single line in Firefox is a Firefox bug
« Reply #77 on: September 20, 2010, 02:30:21 am »
They should. As the add-on is just a Javascript listing with a few bells and whistles.
I have nowhere read about differences in .xpi files depending on the OS. But I'll just give a further look.

ng

  • Guest
Re: The issue of code pasting into a single line in Firefox is a Firefox bug
« Reply #78 on: September 20, 2010, 07:13:48 am »
I think I have understood what is going on.
On Mozilla tech pages (https://developer.mozilla.org/en/Getting_started_with_XULRunner) could be read:

"Step 1: Download XULRunner
You can find a download link on the main XULRunner page here on MDC. Since we are not creating any binary XPCOM components, we only need to download and install the XULRunner runtime package.
The XULRunner download for Windows is a zip file, not a true install. As a developer, I like the idea that XULRunner only needs to be unzipped onto my machine. I am assuming that it doesn’t need to hook into my Windows system and that’s a good thing.
...
In Ubuntu desktop and Xubuntu, XULRunner is already installed by default."

Resuming: my add-on uses XULRunner and under Linux XULRunner is installed by default. Windows users need a separate download and install (sorry about that). The XULRunner for windows could be found at: http://releases.mozilla.org/pub/mozilla.org/xulrunner/releases/

So the best conduct I could think of is among the lines of:
Someone having windows on his computer should install XULRunner first and then my add-on and report here if it works.
After being sure that at least some workaround exists, I could check for having the same add-on running without XULRunner.
The GreaseMonkey script is a better patch but requires to have GreaseMonkey installed, that is a bit more invasive than just having to install XULRunner and the add-on but it could be disactived on-request. As soon as I'll free myself, I'll write a small tutorial about the two different patches.

Any further suggestion?

ng

  • Guest
Re: The issue of code pasting into a single line in Firefox is a Firefox bug
« Reply #79 on: September 20, 2010, 07:47:30 am »
There in another test, to be verified maybe before the previous one suggested.
At the link: https://developer.mozilla.org/en/XUL_School/Getting_Started_with_Firefox_Extensions
there is a very small add-on that does nothing more than showing a simple "Hello world" message. Please install it and tell me if it works under windows. I have tested under Linux and it works exactly as described in the text.

codeguy

  • Hero Member
  • *****
  • Posts: 3824
  • what the h3ll did i name that code?
    • stuff at dkm
Re: The issue of code pasting into a single line in Firefox is a Firefox bug
« Reply #80 on: September 20, 2010, 07:55:08 am »
works!
http://denteddisk.forums-free.com/make-an-appointment-with-the-resident-code-guru-f34.html

Clippy

  • Hero Member
  • *****
  • Posts: 19149
  • I LOVE π = 4 * ATN(1)    Use the QB64 WIKI >>>
    • Pete's Qbasic Site
Re: The issue of code pasting into a single line in Firefox is a Firefox bug
« Reply #81 on: September 20, 2010, 07:59:57 am »
LOL @ sending ME ANYWHERE! WHERE have YOU been?

If he had a fix for it, it would be in the news! FF doesn't care to address the problem and that would be enough for me to switch browsers! Let alone pursue this subject further.
« Last Edit: September 23, 2010, 08:40:06 pm by Clippy »
QB64 WIKI: Main Page
Download Q-Basics Code Demo: Q-Basics.zip
Download QB64 BAT, IconAdder and VBS shortcuts: QB64BAT.zip
Download QB64 SDL: QB64v0954-win15.7z

codeguy

  • Hero Member
  • *****
  • Posts: 3824
  • what the h3ll did i name that code?
    • stuff at dkm
Re: The issue of code pasting into a single line in Firefox is a Firefox bug
« Reply #82 on: September 20, 2010, 08:05:04 am »
Quote from: Clippy on September 20, 2010, 07:59:57 am
LOL @ sending ME ANYWHERE! WHERE have YOU been? AWFUL silent about this for a LONG TIME! Did you finally work up the courage to come back?

We don't need people who post garbage fixes here so delete yourself again LOL!

CodeGuy this fella is talking out of his butt!

If he had a fix for it, it would be in the news! FF doesn't care to address the problem and that would be enough for me to switch browsers! Let alone pursue this subject further.
clppy, we'll just let some time pass and see what, if anything develops. and besides, we got a GIRL PROGRAMMER (i think) who joined -- cool!
http://denteddisk.forums-free.com/make-an-appointment-with-the-resident-code-guru-f34.html

Clippy

  • Hero Member
  • *****
  • Posts: 19149
  • I LOVE π = 4 * ATN(1)    Use the QB64 WIKI >>>
    • Pete's Qbasic Site
Re: The issue of code pasting into a single line in Firefox is a Firefox bug
« Reply #83 on: September 20, 2010, 08:08:18 am »
WHAT "works" and where. The last time you weren't copying CODE in the WIKI.

PLease don't waste anybody else's time if it doesn't work.

« Last Edit: September 22, 2010, 10:12:36 pm by Clippy »
QB64 WIKI: Main Page
Download Q-Basics Code Demo: Q-Basics.zip
Download QB64 BAT, IconAdder and VBS shortcuts: QB64BAT.zip
Download QB64 SDL: QB64v0954-win15.7z

ng

  • Guest
Re: The issue of code pasting into a single line in Firefox is a Firefox bug
« Reply #84 on: September 20, 2010, 08:18:14 am »
Hello Clippy, I am happy to see you too.

To Codeguy, sorry for the big delusion awaiting you but I am a bald italian male. Here in Italy "nicola" is a male name.

Apart from these little social games, could you please tell me what is working and how?

codeguy

  • Hero Member
  • *****
  • Posts: 3824
  • what the h3ll did i name that code?
    • stuff at dkm
Re: The issue of code pasting into a single line in Firefox is a Firefox bug
« Reply #85 on: September 20, 2010, 08:38:51 am »
well, your qbcopycode.xpi is NOT working. it shows up in the extensions in firefox alongside the working hello world extension, but does NOTHING. i even ran it in my testing vm and it didn't do anything at all, even so far as to signal any alert. and then i tried it in win7 natively and same result.
http://denteddisk.forums-free.com/make-an-appointment-with-the-resident-code-guru-f34.html

Clippy

  • Hero Member
  • *****
  • Posts: 19149
  • I LOVE π = 4 * ATN(1)    Use the QB64 WIKI >>>
    • Pete's Qbasic Site
Re: The issue of code pasting into a single line in Firefox is a Firefox bug
« Reply #86 on: September 20, 2010, 08:47:10 am »
LOL, THAT DOES IT!

I WANT MOD privileges so that I can remove this STUPID thread entirely!  >:(

 
QB64 WIKI: Main Page
Download Q-Basics Code Demo: Q-Basics.zip
Download QB64 BAT, IconAdder and VBS shortcuts: QB64BAT.zip
Download QB64 SDL: QB64v0954-win15.7z

codeguy

  • Hero Member
  • *****
  • Posts: 3824
  • what the h3ll did i name that code?
    • stuff at dkm
Re: The issue of code pasting into a single line in Firefox is a Firefox bug
« Reply #87 on: September 20, 2010, 09:01:46 am »
i think we should leave this post so until (if ever) the problem is resolved, we can leave this up as a warning to firefox users, who for the time being are 5h1t outa luck!
http://denteddisk.forums-free.com/make-an-appointment-with-the-resident-code-guru-f34.html

ng

  • Guest
Re: The issue of code pasting into a single line in Firefox is a Firefox bug
« Reply #88 on: September 20, 2010, 09:03:51 am »
O.K.
I'll check and try to understand why on earth the patch won't work under windows. In the meanwhile, would you like to try the second patch?
You should install greaseMonkey (http://www.greasespot.net/). After the installation a monkey face should appear in the lower right corner of FF window's.
Right-clicking on it a menu should appear, please choose "New User Script"
Give it a Name whatever, leave the namespace as it is and add a description if it fits you. In the 'Includes' section there should be the single line:"http://qb64.net/*".
An editor (the same chosen during installation), will appear with 6 rows already filled in by GM wizard.
Append after the 6 rows the following code:

Code: [Select]
var allLinks = document.evaluate(
    'http://p[substring(@style,1,12)="padding: 1em"]',
//    'http://p[@style="padding: 1em; line-height:100%; margin-left:10px; white-space: pre; font-family: Courier; background-color: black; color: lightgrey;"]',
    document,
    null,
    XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,
    null);

for (var i = 0; i < allLinks.snapshotLength; i++)
{
    var thisLink = allLinks.snapshotItem(i);
var htmlString = thisLink.innerHTML;
var table = document.createElement("div");
var tableHTML = '<div style="margin: 0 auto 0 auto; border-bottom: 1px solid #000000; margin-bottom: 5px; font-size: small; background-color: #4040C0; color: #ffffff;"><p style="margin: 2px 0 1px 0;">';

for(var j=0; j < htmlString.length; j++)
{
var ch = htmlString.charAt(j);
tableHTML = tableHTML.concat(ch);
if( ch=='\n' ) tableHTML = tableHTML.concat('<br>');
}

tableHTML = tableHTML.concat('</p></div>');
table.innerHTML = tableHTML;

thisLink.parentNode.insertBefore(table, thisLink.nextSibling);
thisLink.parentNode.removeChild(thisLink);
}

Save the code written so far and make sure that the 'Enabled' box is checked.
Then try any page of the qb64.net domain.
The page should have an aspect sligtly different to what you are used to and then try to copy and past some snipped of code.
It should work, tell me of any problem you'll encounter.

ng

  • Guest
Re: The issue of code pasting into a single line in Firefox is a Firefox bug
« Reply #89 on: September 20, 2010, 09:35:34 am »
I have just tested (over the phone) the add-on on a windows machine and it works well.
Codeguy: when you say that the add-on does absolutely nothing, this include the presence of a new menu item? The menu bar is as has always been or there is a new item on the right hand side of it?

  • Print