Development :  K-Meleon Web Browser Forum
K-Meleon development related discussions. 
Pages: Previous123
Current Page: 3 of 3
Re: K-Meleon 74 / Gecko 31
Posted by: siria
Date: October 20, 2014 10:48PM

Thank you for testing and for finding a solution!
Too crazy again that the same commands in the same KM version, only different Windows Systems, can suddenly stop working, as if things weren't already complicated enough with all the JS probs sad smiley

Have now updated the macro, if anyone used it please download again.

Options: ReplyQuote
Re: K-Meleon 74 / Gecko 31
Posted by: JohnHell
Date: October 20, 2014 11:40PM

Maybe I got lost.

Did I understand correctly?, if you, JamesD, are able to run the injectJS in the 4th scenario:

Load a page with javascript disabled, enable after load and run a macro with injectJS command?

I'd swear that in the virtual machine with Win7 I just tested now that doesn't work...

EDIT: I did with you v3 siria :-? Maybe I did it wrong. Running the VM is a pain arghhhh.



Edited 2 time(s). Last edit at 10/20/2014 11:41PM by JohnHell.

Options: ReplyQuote
Re: K-Meleon 74 / Gecko 31
Posted by: JamesD
Date: October 20, 2014 11:49PM

Now let's make it complicated. I wish to get some information from the system that I did not already know. I want to know what is the current day of the week from the system date.

"var d = new Date(); dm = d.getDay();  function returnVar(dm){return dm;} returnVar(dm);");

This code was to report back the data, but Dorian says that does not work. So how do I get the data into the title?

I don't think I ever actually got it to work.

Options: ReplyQuote
Re: K-Meleon 74 / Gecko 31
Posted by: siria
Date: October 20, 2014 11:52PM

No you're right John, it does NOT work if JS was off during load, but James had confirmed that too.

Anyway, at the moment the macro is at version-4, please redownload.
No major changes but just in case made the open(JS) now via $_code too.
And added a 6th variant that uses injectJS with a function.

Options: ReplyQuote
Re: K-Meleon 74 / Gecko 31
Posted by: siria
Date: October 20, 2014 11:57PM

James, if you get it into a var, you can use the very same method as this macro.
Just add to your JS code at the end: document.title=dm
(it could work with injectJS, but open(JS) may need that infamous functionwrap again, not sure)

Options: ReplyQuote
Re: K-Meleon 74 / Gecko 31
Posted by: JamesD
Date: October 21, 2014 12:00AM

Quote
JohnHell
Maybe I got lost.

Did I understand correctly?, if you, JamesD, are able to run the injectJS in the 4th scenario:

Load a page with javascript disabled, enable after load and run a macro with injectJS command?

I'd swear that in the virtual machine with Win7 I just tested now that doesn't work...

EDIT: I did with you v3 siria :-? Maybe I did it wrong. Running the VM is a pain arghhhh.

I did not mean the 4th test ran as siria set it up. The javascript only runs when the page was loaded with JS enabled. I did one and four only because those lines could be directly replaced.

Toggling the JS after the page has loaded has no effect on my system which is Win 7(32 bit) using KM 74 g31 u1.

Options: ReplyQuote
Re: K-Meleon 74 / Gecko 31
Posted by: JohnHell
Date: October 21, 2014 12:26AM

Quote
JamesD
I did not mean the 4th test ran as siria set it up. The javascript only runs when the page was loaded with JS enabled. I did one and four only because those lines could be directly replaced.

Toggling the JS after the page has loaded has no effect on my system which is Win 7(32 bit) using KM 74 g31 u1.

I was testing 74g31u1 on it too after I understood it could run on Win7.

Ok, I misunderstood then confused smiley

Continue testing then winking smiley I don't want to discourage both you but I think we are going in circles. Won't run :/ I tested less with the image macro we made but for me was clear confirming what Dorian said about injectJS problem.

I don't think it got solved with update 1. Or I'm missing something.

Anyway, I stop making noise in the thread with my non-helping speech smiling smiley

Options: ReplyQuote
Re: K-Meleon 74 / Gecko 31
Posted by: JamesD
Date: October 21, 2014 12:43AM

Since injectJS() only works when the page has been loaded with JS enabled, that means that "Send Page as Link...", right click menu in Mail/News Buttons, will not work in pages loaded with JS disabled. I really miss the CAPS system.

@ JohnHell

Speech is OK. Every bit of knowledge helps.

Options: ReplyQuote
Re: K-Meleon 74 / Gecko 31
Posted by: JohnHell
Date: October 21, 2014 01:25AM

Before close all and go to bed I did a quick test and this is not a K-meleon issue but must be a Gecko issue, because in Firefox 31 happens the same with bookmarklets ("javascript:whatever" bookmarks).

If you load a page with javascript disabled, even enable after load, bye, bye, bookmarklets functionality.

The only way, the same as K-meleon. Have enabled JS before load.

Security measure by Mozilla?

Options: ReplyQuote
Re: K-Meleon 74 / Gecko 31
Posted by: siria
Date: October 21, 2014 01:32AM

I know it can't help to fix anything, we three agree on this. But it can demonstrate better where the problem lies exactly to non-macrocoders who don't understand what we talk about at all, not seeing any probs with toggling ;-) And it can also make testing a bit easier. An unexpected little discovery though is that it works even worse on win7. Sigh.

Oh great, and that's even intentional by Mozilla?! Grmpf, slowly am getting a little pissed, just the last drop in the bucket, grrr



Edited 1 time(s). Last edit at 10/21/2014 01:37AM by siria.

Options: ReplyQuote
Re: K-Meleon 74 / Gecko 31
Posted by: Yogi
Date: October 21, 2014 07:47AM

Quote
JamesD

The javascript only runs when the page was loaded with JS enabled.

Toggling the JS after the page has loaded has no effect on my system which is Win 7(32 bit) using KM 74 g31 u1.

Now I am at a loss.
Testing with KM 74 g31 u1 on Win7 (64bit).

What I can confirm is that testJS.kmm only runs when the page was loaded with JS enabled.

What I can't confirm (I don't know what am I doing wrong) is that toggling the JS after the page has loaded has no effect on my system
Toggling JS seems to work here:



Options: ReplyQuote
Re: K-Meleon 74 / Gecko 31
Posted by: siria
Date: October 21, 2014 09:12AM

Which is exactly what was to be demonstrated with my macro, LOL! grinning smiley
The prefs and buttons are saying JS were allowed, but in reality JS-actions are still blocked on THIS page - so that setting is obviously lying!

Until the next page load, then it will kick in again - on the newly loaded page.
And it will be frozen again in the state it had when loading, be it allowed or blocked.

Next test: Load 2 tabs while JS is blocked. Then allow it. Reload only 1 of the two neighbor tabs => Result: it now works on the newly loaded page, but still NOT on the neighbor page.

The permission state is fixed to each tab/page at this moment and not changeable with a global permission toggle.
It reminds me of the ZOOM settings, which are somehow fixed to tabs.

Whether JS is now fixed on the tab or only the document, at any rate the JS-pref seems now separated into a global and an individual page/tab-setting. And the traditional JS-toggle is only toggling the global settings.
If that's true, we'd need a new command for individual toggling, but things get really complicated then for handling.



Edited 2 time(s). Last edit at 10/21/2014 09:33AM by siria.

Options: ReplyQuote
Re: K-Meleon 74 / Gecko 31
Posted by: siria
Date: October 21, 2014 09:57AM

Seems to me like its setting a flag at page load...
After thinking about the alternatives, my preferred solution would now be to prevent that flag being set at all to begin with. If it would automatically be removed after each page load.

But no idea if then the global setting would kick in again, or if absence of that flag would mean "always allowed" or "always blocked", regardless the global pref?

Then again, what if JS is allowed on a page that did not load the SITE scripts anyway? Would that harm? Would the site be able to load them afterwards, with timeout or something? No idea, but if not, a general allowance AFTER page load might be no prob.
Instead it would even make constant toggling of JS by macros unnecessary!
But if there is a danger from site scripts, then it would be best to have the old system with only the global setting counting.

Options: ReplyQuote
Re: K-Meleon 74 / Gecko 31
Posted by: Yogi
Date: October 21, 2014 10:22AM

Quote
siria
Which is exactly what was to be demonstrated with my macro, LOL! grinning smiley
The prefs and buttons are saying JS were allowed, but in reality JS-actions are still blocked on THIS page - so that setting is obviously lying.

Or in case JS was allowed and I disable JS, the script is still working on THIS page.

OK, I see now what you mean.
The toggle doesn't has effect on the already loaded page (THIS page) but only at refreshing or on the next page.

Options: ReplyQuote
Re: K-Meleon 74 / Gecko 31
Posted by: JohnHell
Date: October 21, 2014 12:57PM

I re-confirm that in Firefox 24 (our GRE in the final 74), the bookmarklets are fully dependant in the javascript.enabled pref.

Whenever you load a page with or without JS enabled, at the time of run a bookmarklet, if JS is enabled, the bookmarklet runs. But if it is not, won't run.

Toggling JS is enough.

As we stated, totally different with GRE 31 FF or KM.

Options: ReplyQuote
Re: K-Meleon 74 / Gecko 31
Posted by: JamesD
Date: October 21, 2014 07:48PM

I made a change to mail.kmm which gets me a method to use "Send Page as Link...". Please note that this is not for everyone. It will work with MS Outlook. If you use a different mail program, you would need to adjust the code.

Items in red are the new code. ( The $JS_doit and &JS_hndlTop; lines are unchanged. )

What I see that is different is that when a new mail opens in Outlook, there is nothing filled it. I move the cursor to "Subject:" and press CTRL+V. Then I move cursor to body and press CTRL+V again. There are two lines of information on the clipboard - $TITLE on line one and $URL on line two. Only the first line appears in Subject, but both lines appear in the body.

Mail_SendPageURL{
macroinfo=_("Send a link to the current page by mail");
if($tux=="")
{  
   if ($_MNOnload_js) {
   $JS_doit="location='mailtomoody smileysubject='+encodeURIComponent(title)+'&body='+encodeURIComponent(URL)";
   &JS_hndlTop;
   } else {
   setclipboard( $TITLE. "\n". $URL  );   
   exec("c:\\program files\\microsoft office\\office12\\OUTLOOK.EXE /c ipm.note" ) ;
   }
}
else

And it needs these changes also.

_Mail_Configure{
$_client=getpref(STRING,$_pref); $_client==""?macros($_macro):0; $_client=prompt($_txt,$_tit,$_client); $_client==""?0:setpref(STRING,$_pref,$_client);
}

_Mail_JS {
$_MNOnload_js = getpref(BOOL,"javascript.enabled");
}

_Mail_BuildMenu{

and

$OnInit=$OnInit."_Mail_BuildMenu;";
$OnLoad=$OnLoad."_Mail_JS;";


Options: ReplyQuote
Re: K-Meleon 74 / Gecko 31
Posted by: JohnHell
Date: October 21, 2014 09:14PM

Find as you type, not working without opening the search box.

Confirm, please.

I was trying to find if 74gre31 has the same bug as 74 final that when you search and find text in a textarea, starts editing the textarea instead continue searching.



Edited 1 time(s). Last edit at 10/21/2014 09:16PM by JohnHell.

Options: ReplyQuote
Re: K-Meleon 74 / Gecko 31
Posted by: JamesD
Date: October 22, 2014 06:19PM

Quote
JohnHell
Find as you type, not working without opening the search box.

Confirm, please.

I was trying to find if 74gre31 has the same bug as 74 final that when you search and find text in a textarea, starts editing the textarea instead continue searching.

Can you explain the test that I need to preform? Is a textarea just text or an input field?

Options: ReplyQuote
Re: K-Meleon 74 / Gecko 31
Posted by: JohnHell
Date: October 22, 2014 08:02PM

Quote
JamesD
Quote
JohnHell
Find as you type, not working without opening the search box.

Confirm, please.

I was trying to find if 74gre31 has the same bug as 74 final that when you search and find text in a textarea, starts editing the textarea instead continue searching.

Can you explain the test that I need to preform? Is a textarea just text or an input field?

Nevermind to the first thing. It looks like it was some kind of page focus problem I found before I post the following example.

Anyway, to the second problem I was trying to trigger, to see if it happens as K-meleon 74 final, make sure you have in "Edit> Page search" the first two options checked. Don't check links only.

Now go to this example page and start typing the textarea text (just typing, not editing the textarea):
http://www.geocities.ws/jothache/kmtextarea.html

If after type the first letter, starts editing the textarea after the first match, the bug is still present in 74GRE31.

I used this a lot in 1.6 when I was posting to a forum like this a long text and you missed what you wrote and it was usefult to find where you said something if you did. Now, when you use "find as you type", when match, starts editing, what is a shame :/



Edited 1 time(s). Last edit at 10/22/2014 08:03PM by JohnHell.

Options: ReplyQuote
Re: K-Meleon 74 / Gecko 31
Posted by: JamesD
Date: October 22, 2014 11:33PM

I did not get anything to happen in KM 7424 or KM 7431. I made sure that one and two were checked and three was unchecked in page search. I did "Find in Page" and entered "Edit". I then opened your link in a new tab and began typing in the text area. I included the word "Edit" in the line that I added. Nothing happened. Is this the right way to test?

Options: ReplyQuote
Re: K-Meleon 74 / Gecko 31
Posted by: siria
Date: October 23, 2014 12:25AM

And if you click outside the text input area, and then just type, e.g. "bug"?

Options: ReplyQuote
Re: K-Meleon 74 / Gecko 31
Posted by: JohnHell
Date: October 23, 2014 12:52AM

@all, Ok, you have to restart k-meleon or won't work "find as you type" as it should.

Tested this time in XP SP2 Virtual Machine too. I found here that you should restart k-meleon to make "find as you type" work.

@Siria the page doesn't focus on the textarea so if you type after load the page, you aren't typing inside the textarea but on the body itself trying to find your text.

You can click outside textarea if you feel it's better, but the result is the same smiling smiley

EDIT: I love how enormously tiny can be a compressed MS video 1 file smiling smiley
video typing not working.



Edited 1 time(s). Last edit at 10/23/2014 01:02AM by JohnHell.

Options: ReplyQuote
Re: K-Meleon 74 / Gecko 31
Posted by: JamesD
Date: October 28, 2014 06:12PM

I have had an experience using KM 74 g31 u1 where the "Find Next" button did not work. I seems to work fine on some pages, but when I was working on the wiki to edit MacroLanguage2, it did not work.

I was looking for "!!" and KM found and highlighted the first occurrence. When I click on the button, "Find Next", or use F4 nothing happens. If I try "Find Previous", KM finds and highlights the last occurrence in the document. It seems to be having a problem with text within input fields.

Right now I have "Next" in the find field. The field is red while there now three copies of that word in this post.

JohnHell, is this part of the same problem you have described?

Options: ReplyQuote
Re: K-Meleon 74 / Gecko 31
Posted by: JohnHell
Date: October 28, 2014 10:40PM

Nope, that is not my problem but I couldn't test in the edit page because for some damn reason I couldn't log in to the wiki with 74g31 :-?

The web asks me for login continuously, and it's not about cookies, that are allowed. Just comes again and again the login screen from bugs (by the way, confusing to log in bugs to edit the wiki) when I'm already logged.


But as you are in the edit pages, without clicking inside the edit textarea, find a text inside the text area by typing it (NOT USING THE SEARCH BOX, BUT FIND AS YOU TYPE FEATURE) outside the textearea. If when it founds a match, starts editing the text in the textarea box, instead scroll the page to where the match is (in 1.6 didn't highlight, just moved the page to the match or beep error if not match), then, you have found the problem I described.

After post this I'll try again with 74g31 if I can log-in :/

Options: ReplyQuote
Re: K-Meleon 74 / Gecko 31
Posted by: JohnHell 74g31
Date: October 28, 2014 10:49PM

Ok, what I see is that textareas/input boxes work as a firewall to "find as you type feature" and search box.

Matches the first ocurrence outside the edit box, once match first inside the box, can't go outside to the next, only backwards and only matches one ocurrence in text box, not all inside it.

Options: ReplyQuote
Pages: Previous123
Current Page: 3 of 3


K-Meleon forum is powered by Phorum.