General :  K-Meleon Forum
General discussion about K-Meleon. 
Pages: 12Next
Current Page: 1 of 2
Would like a way to zoom text only from keyboard
Posted by: Anonymous User
Date: September 07, 2017 03:28PM

I would like to be able to zoom text only from my keyboard. Is there a way to create a shortcut for it. A way to do it on the right click menu would be nice as well. I also blacklist all javascrpt and would like a way to whitelist sites from either the keyboard or right click menu.

Options: ReplyQuote
Re: Would like a way to zoom text only from keyboard
Posted by: JohnHell
Date: September 07, 2017 10:35PM

Quote
kingtravel28894
I would like to be able to zoom text only from my keyboard. Is there a way to create a shortcut for it.

You can change it in your profile accel.cfg. For example:

CTRL VK_ADD = ID_FONT_INCREASE
CTRL VK_MINUS =ID_FONT_DECREASE


Quote
kingtravel28894
I also blacklist all javascrpt and would like a way to whitelist sites from either the keyboard or right click menu.


You can toggle Javascript on and off through F7 key.

Options: ReplyQuote
Re: Would like a way to zoom text only from keyboard
Posted by: siria
Date: September 08, 2017 05:43AM

Quote
kingtravel28894
I would like to be able to zoom text only from my keyboard. Is there a way to create a shortcut for it. A way to do it on the right click menu would be nice as well.

Hmm, that means you don't want to use toolbar buttons?
And not the main menus?

John has already explained the shortcuts.
If you also want to extend your page context menu:
Edit > Configuration > Menus (or manually open file menus.cfg in your current profile folder):
Add for example this:

!Document{
Zoom In &Text=ID_FONT_INCREASE
Zoom Out T&ext=ID_FONT_DECREASE
}


But usually one would just right-click on the zoom-buttons to customize their action:
View > Zoom > Zoom Buttons > Text or Page or Images

By far the best, if (??) a user has a mousewheel, zoom with CTRL+wheel.
Whether that zooms only TEXT or the whole PAGE is a user setting. It depends on this pref, but not sure if there's a GUI for it somewhere, otherwise can be changed on "about:config"
browser.zoom.full (false=text / true=page)
By the way, the wheel direction can be customized too, but slightly more complicated ;-)

Options: ReplyQuote
Re: Would like a way to zoom... / javascript site exceptions
Posted by: siria
Date: September 08, 2017 06:59AM

Quote
kingtravel28894
I also blacklist all javascript and would like a way to whitelist sites from either the keyboard or right click menu.

Like John, I also prefer to just toggle JS manually when needed. That's what the Privacy Bar is just great for smiling smiley And for permanent exceptions just love the FF-addon ExExceptions (see tip below), which opens a great GUI like that:
http://kmeleon.sourceforge.net/forum/file.php?1,file=897,filename=Zwischenablage01.gif

Anyway, lets try a little macro. Since KM75.0 a new macrocommand was introduced for exactly such things ("addperm"), but haven't seen anyone using it yet. Made a little test macro for it now, but not quite sure if I got the syntax right. Cannot test it myself currently, stuck on KM1.6. If anyone would like... cool smiley

Howto: COPY the attached test-kmm into folder K-Meleon/macros and restart KM.
Menu is in Tools>Privacy AND on page right-click: "Permissions Exception (addperm)"

========= NOTES for other testers:
How to delete a site later? setting its value empty??
And what does "promp" exactly? Ask each time??
HOW to check the current status of a site by macro??
How about subdomains?
Do we have to add one of those too, or is it called automatically by addperm?
id(ID_PAGE_DISABLE_JS);
id(ID_PAGE_ENABLE_JS);

========= TIP for all smiling smiley
A great FF-addon, with full editor for several sorts of permissions:
FF-Addon ExExceptions / KM-ExExpermissions:
http://kmeleonbrowser.org/forum/read.php?9,124407
FILES for KM7X extension:
http://kmeleonbrowser.org/forum/file.php?9,file=1312,filename=exexceptions.7z
Update with this kmm: http://kmeleonbrowser.org/forum/file.php?9,file=1314,filename=ExExceptions.kmm
Add this button pic into skins/shared or default: http://kmeleonbrowser.org/forum/file.php?9,file=1313,filename=macro_ExExceptionsKM.bmp

Attachments: addperm_test.kmm (2.6 KB)  
Options: ReplyQuote
Re: Would like a way to zoom... / javascript site exceptions
Posted by: JamesD
Date: September 16, 2017 07:41AM

siria

I have your macro loaded. Will try to test with KM76RC2. Don't expect fast reply. Old guys are slow, and I have little time now for computer.

:::--------------------------
JamesD

Options: ReplyQuote
Re: Would like a way to zoom... / javascript site exceptions
Posted by: siria
Date: September 17, 2017 03:24AM

Thanks for helping James smiling smiley

Options: ReplyQuote
Re: Would like a way to zoom... / javascript site exceptions
Posted by: JamesD
Date: November 05, 2017 02:43AM

Siria

I am really late, but have just started my first test. I have success with deny image session only. Now, must apply what I have learned to other types.

I will not try to code too many items together at first. One step at a time so I can follow with what is left of my mind.

:::--------------------------
JamesD

Attachments: addpermA1_test.kmm (1.6 KB)  
Options: ReplyQuote
Re: Would like a way to zoom... / javascript site exceptions
Posted by: anonymous
Date: November 05, 2017 05:05AM

Quote
siria
And what does "promp" exactly? Ask each time??

That is a typo in wiki and should be corrected. It does nothing, because "promp" does not match "prompt" in line 1934 of plugins.cpp file.

http://kmeleon.cvs.sourceforge.net/viewvc/kmeleon/k-meleon/Plugins.cpp?revision=1.148&view=markup

Options: ReplyQuote
Re: Would like a way to zoom... / javascript site exceptions
Posted by: JamesD
Date: November 05, 2017 05:11AM

Thanks for the proper spelling of 'prompt'. No one caught it in the documentation for a long time. Going back to test again now.

:::--------------------------
JamesD

Options: ReplyQuote
Re: Would like a way to zoom... / javascript site exceptions
Posted by: JamesD
Date: November 05, 2017 05:35AM

And to top it all off, I cannot complain about the documentation,

I wrote it!

siria, could you fix the wiki? Since my Parkinsons trouble, I don't think I trust me to do anything there. Assuming that I could remember how to get into edit there.

:::--------------------------
JamesD

Options: ReplyQuote
Re: Would like a way to zoom... / javascript site exceptions
Posted by: siria
Date: November 05, 2017 06:12AM

Very sorry your life got so hard James :-(
And still you're doing your best to help others, as always. Bad things always hit the wrong people, not fair.

But the typo is exactly how Dorian had written it. First I thought too it probably was wrong, then later wondered if he did it intentionally, to avoid perhaps a confusion or whatever. Never mind.

Quote
anonymous
"promp" does not match "prompt" in line 1934 of plugins.cpp file.
http://kmeleon.cvs.sourceforge.net/viewvc/kmeleon/k-meleon/Plugins.cpp?revision=1.148&view=markup

Very interesting link, thanks!

#include "nsIPermissionManager.h"
1924 bool AddPermission(const char* url, const char* type, const char* perm, bool sessionOnly)
1925 {
1926 nsCOMPtr<nsIPermissionManager> man = do_GetService(NS_PERMISSIONMANAGER_CONTRACTID);
1927 if (!man) return false;
1928
1929 uint32_t permission = 0;
1930 if (strcmp(perm, "allow") == 0)
1931 permission = nsIPermissionManager::ALLOW_ACTION;
1932 else if (strcmp(perm, "deny") == 0)
1933 permission = nsIPermissionManager::DENY_ACTION;
1934 else if (strcmp(perm, "prompt") == 0)
1935 permission = nsIPermissionManager::PROMPT_ACTION;
1936 else
1937 return false;
1938 nsCOMPtr<nsIURI> uri;
1939 NewURI(getter_AddRefs(uri), nsDependentCString(url));
1940 return NS_SUCCEEDED(man->Add(uri, type, permission, sessionOnly?nsIPermissionManager::EXPIRE_SESSION:nsIPermissionManager::EXPIRE_NEVER, 0));


And of course have no clue about cpp, but that "bool sessionOnly" in line-2 had me wondering, was "SESSION_ONLY" a typo too... until it dawned: perhaps it's just a var name, and perhaps instead of "SESSION_ONLY" we should write true/false?! But so far a wild guess only, needs testing.
(exactly what rodocop mentioned just yesterday, without easy examples the wiki and KMML are hard to figure out!)



Edited 1 time(s). Last edit at 11/05/2017 06:15AM by siria.

Options: ReplyQuote
Re: Would like a way to zoom... / javascript site exceptions
Posted by: JamesD
Date: November 05, 2017 08:26AM

siria

So I copied something that Dorian wrote. Maybe I can forgive myself a little bit.

Prompt still does not work for me.

Images for 'session only' do seem to work. Also in this case the method to remove is to block images previously allowed, or allow images previously blocked.

I choose session only to test first because a restart should clean up any mess that I made.

This is my current test code. Still separate pieces - real simple.
Note that cookies do not seem to work yet.
#  K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage2)
#
# ---------- addperm_test.kmm  (Alpha 1)
# ---------- K-Meleon Macro Language - TEST of 'adperm' macro ststement ---------------
#
# Dependencies        : main.kmm, macros plugin
# Resources           : -
# Preferences         : -
# References          : FORUM:    http://kmeleonbrowser.org/forum/read.php?1,142412
# Notes               : based on 'addperm_test.kmm' by siria
#                      Testing new macro command to blacklist a site for images
#                      http://kmeleonbrowser.org/wiki/macrolanguage2#addperm()
#                      MENU(s): Tools > Privacy > Permissions Exception (addperm)  (or right-click on page)
#                      options acc. Dorian:  allow deny promp   /  adding SESSION_ONLY is optional
# Version             : Alpha 2   2017-11-05  by JamesD
# --------------------------------------------------------------------------------


addpermA1_ImgBlkSes {
macroinfo="Add Site Exception: deny images for session" ;
addperm($URL, "image", "deny", SESSION_ONLY);
}

addpermA1_ImgAlwSes {
macroinfo="Add Site Exception: allow images for session" ;
addperm($URL, "image", "allow", SESSION_ONLY);
}

addpermA1_ImgPrpSes {
macroinfo="Add Site Exception: promp for images for session" ;
addperm($URL, "image", "prompt", SESSION_ONLY);  ##  prompt not promp
}

addpermA1_CooBlkSes {
macroinfo="Add Site Exception: deny cookies for session" ;
addperm($URL, "cookies", "deny", SESSION_ONLY);
}

addpermA1_CooAlwSes {
macroinfo="Add Site Exception: allow cookies for session" ;
addperm($URL, "cookies", "allow", SESSION_ONLY);
}

_addpermA1_BuildMenu{
$_menu="Permissions Added (addperm)";
setmenu($_menu,macro,"Images:  Block images on site for session","addpermA1_ImgBlkSes");
setmenu($_menu,macro,"Images:  Allow images on site for session","addpermA1_ImgAlwSes");
setmenu($_menu,macro,"Images:  PROMPT for images on site for session", "addpermA1_ImgPrpSes");


setmenu($_menu,macro,"Cookies:  Block cookies on site for session","addpermA1_CooBlkSes");
setmenu($_menu,macro,"Cookies:  Allow cookies on site for session","addpermA1_CooAlwSes");

#setmenu($_menu,macro,"Scripts:  WHITElist site (session)","addpermSess_script(allow)");
#setmenu($_menu,macro,"Scripts:  WHITElist site","addperm_script(allow)");
#setmenu($_menu,macro,"Scripts:  empty (reset site??)","addperm_script()");
# in menu Tools > Privacy:
setmenu("&Privacy",popup,$_menu,"P&ermissions");
# right-click on page:
setmenu(Document,popup,$_menu,-1);
$_menu="";
}

#---------------------------------------------
$OnInit=$OnInit."_addpermA1_BuildMenu;";
$macroModules=$macroModules."addpermA1_test;";

:::--------------------------
JamesD

Options: ReplyQuote
Re: Would like a way to zoom... / javascript site exceptions
Posted by: siria
Date: November 05, 2017 09:19AM

Not quite sure if you're kidding (sure hope), because you DID the right thing when copying from Dorian. What do WE know about C++???

It must be "cookie" not "cookies" smiling smiley
Would also try at the end true/false instead of "SESSION_ONLY", when you later try permanent settings too

Options: ReplyQuote
Re: Would like a way to zoom... / javascript site exceptions
Posted by: JamesD
Date: November 05, 2017 08:00PM

siria

You are right. It must be cookie and not cookies in the statement. With that change my code does work for cookies.

At the time that I wrote the docs, I got lazy or something. I used to always test any new statements before writing the the docs for them. I did not do that for 'addperm()'. I don't know much about c++ except that items like prompt, cookie do show and have the correct spelling.

I am going to use the link provided by anonymous and check all 'words' to be used with 'addperm()'.

Hopefully, it will not be months before I get to work on this again.

:::--------------------------
JamesD

Options: ReplyQuote
Re: Would like a way to zoom... / javascript site exceptions
Posted by: siria
Date: November 05, 2017 09:37PM

Fine for me, thanks. And as you can see, this one isn't quite as easy to test as other new functions, at least for us. And with your health probs things don't get easier.
So I for one still find it most important that new functions are at least mentioned in the wiki, along with the info that is already available, even if not yet fully tested, if that avoids a long delay and meanwhile the new function may get forgotten again completely.

But something else that now makes me wonder:
A "session only" setting sure makes sense for cookies, but for all other objects seems rather useless? If they don't store anything permanently, like scripts, stylesheets etc. there's no point, it's the same effect as "allow"

And am especially missing an equally simple "remove" possibility. Once addperm was used on a domain, things get complicated.
PS: googling around, found the info that "about:permissions" page shows an overview (not in KM1.6 of course), don't know if there are also edits possible (??). But Mozilla devs in their infinite user friendliness decided to remove this "unnecessary" function in FF45 again without any replacement. As usual sad smiley



Edited 2 time(s). Last edit at 11/05/2017 09:52PM by siria.

Options: ReplyQuote
Re: Would like a way to zoom... / javascript site exceptions
Posted by: JamesD
Date: November 06, 2017 04:55AM

I think I have the right words spelled correctly now. The types are image, cookie, popup, and script. The permissions are allow, deny, and prompt. I have not gotten prompt to work yet.

So far I have only tested with the SESSION_ONLY as the fourth parameter.

The image was tested actually on a site where block (deny) was obvious. For the others my check was the existence/value of the domain in TOOLS - PRIVACY - PERMISSIONS - [ COOKIES, IMAGES, POPUPS, JAVASCRIPT Exceptions].

Not sure when I will have some time to test more. Soon, I hope.

:::--------------------------
JamesD

Attachments: addpermA1_test.kmm (3.4 KB)  
Options: ReplyQuote
Re: Would like a way to zoom... / javascript site exceptions
Posted by: siria
Date: November 06, 2017 08:18AM

Thanks... And just a thought, would this perhaps fix prompting?

addpermA1_ImgPrpSes {
macroinfo="Add Site Exception: prompt for images for session" ;
addperm($URL, "image", "prompt",true);
}

Options: ReplyQuote
Re: Would like a way to zoom... / javascript site exceptions
Posted by: anonymous
Date: November 09, 2017 04:32AM

@siria
Yes, "session only" is for cookies and Gecko ignores "prompt" for images and scripts. Some people had to close 500 popups. Viewing and removing permissions is not implemented in macros, but it can be added if requested. There are XUL extensions for permissions.

@JamesD
Start Firefox and look at Tools/Page Info -> Permissions.

Options: ReplyQuote
Re: Would like a way to zoom... / javascript site exceptions
Posted by: JamesD
Date: November 09, 2017 05:17AM

Quote
anonymous
@JamesD
Start Firefox and look at Tools/Page Info -> Permissions.

I don't run that software.

:::--------------------------
JamesD

Options: ReplyQuote
Re: Would like a way to zoom... / javascript site exceptions
Posted by: anonymous
Date: November 09, 2017 06:18AM

@JamesD
This image of Page Info shows it.
If "Always Ask" is missing, "prompt" is not available.

Options: ReplyQuote
Re: Would like a way to zoom... / javascript site exceptions
Posted by: rodocop
Date: November 09, 2017 09:27AM

Quote
anonymous
@JamesD
Start Firefox and look at Tools/Page Info -> Permissions.

Surprise!
K-Meleon 75/75.1 Pro also has that PageInfo! No need to use Firefox!




Latest Release KM75.1 Latest dev KM76RC ||| Visit The K-Meleon Place and join me there!
Old good stuff: KM-1.6db+NS © dugbugoffice // KM-16-S2014 © Fred // KM-1.6beta2.6 © JamesD // KM Twin+ © rodocop // KM 1.8.24.22 © adodupan

RECOMMENDED! K-Meleon 76 Pro ==» Download portable: 7zip or EXE =//= Discuss on forum
K-Meleon 75.1 Pro: Download =//= Discuss || Portable Flash plugin (x86/x64 DLLs)



Edited 2 time(s). Last edit at 11/09/2017 09:28AM by rodocop.

Options: ReplyQuote
Re: Would like a way to zoom... / javascript site exceptions
Posted by: JamesD
Date: November 09, 2017 08:42PM

Thanks everyone for the info about which types get certain options. I have this as:
##  NOTES:::
##  'SESSION_ONLY' IS APPLICABLE ONLY TO COOKIES  
##
##  'PROMPT IS NOT APPLICABLE TO IMAGES OR SCRIPTS
##

I have been trying to find a way to link the view data items under tools to menu selections in my macro, but no luck. The privacy plugin only has 'clear data' items from what I can see in Quick Reference.

Hopefully, I get some more time to work on the macro today. I think it is close to complete. I think the menu will be much smaller now.

anonymous

I think you noted that there could be XUL things to allow viewing? Can you explain further?

siria

I will test 'true' for session_only, if I can. Dorian's standard has been to use uppecaser letters with underscores for spaces previously, has it not?

:::--------------------------
JamesD

Options: ReplyQuote
Re: Would like a way to zoom... / javascript site exceptions
Posted by: JamesD
Date: November 09, 2017 10:06PM

Well, here is the code. As for testing, that is difficult. I guess I might need to setup a new copy of KM. Some of the things in this one don't let things happen such that the macro makes any difference.

It does not cause any error in the console and images seem to display or not as per the macro. I will need t find a domain which does have popups in the way that KM blocks them to test

:::--------------------------
JamesD

Attachments: addpermB1_test.kmm (3.2 KB)  
Options: ReplyQuote
Re: Would like a way to zoom... / javascript site exceptions
Posted by: rodocop
Date: November 09, 2017 11:01PM

JamesD,

in KM 75 Pro or 75.1 Pro the 'PageInfo' XUL-module is present with "Permissions" tab.

image clickable



Latest Release KM75.1 Latest dev KM76RC ||| Visit The K-Meleon Place and join me there!
Old good stuff: KM-1.6db+NS © dugbugoffice // KM-16-S2014 © Fred // KM-1.6beta2.6 © JamesD // KM Twin+ © rodocop // KM 1.8.24.22 © adodupan

RECOMMENDED! K-Meleon 76 Pro ==» Download portable: 7zip or EXE =//= Discuss on forum
K-Meleon 75.1 Pro: Download =//= Discuss || Portable Flash plugin (x86/x64 DLLs)

Options: ReplyQuote
Re: Would like a way to zoom... / javascript site exceptions
Posted by: anonymous
Date: November 10, 2017 03:07AM

@JamesD
She already uses a XUL extension, because KM 1.x has no dialog for "script" in kmprefs. Your current browser has dialogs to change, view and remove "cookie", "image", "popup" and "script" permissions.

Options: ReplyQuote
Re: Would like a way to zoom... / javascript site exceptions
Posted by: JamesD
Date: November 10, 2017 04:07AM

rodocop

I know your stuff has much more than the original. The page info is something that you added?

Good old Win 10 just had a hiccup. "WINDOWS SERVICE EXCEPTION"

I guess I better go and try to find out what that means

:::--------------------------
JamesD

Options: ReplyQuote
Re: Would like a way to zoom... / javascript site exceptions
Posted by: JamesD
Date: November 10, 2017 04:17AM

anonymous

Yes, the menus to use to go to these items are in TOOLS - PRIVACY - PERMISSIONS. I do not see a way currently to check a table for just one entry.

:::--------------------------
JamesD

Options: ReplyQuote
Re: Would like a way to zoom... / javascript site exceptions
Posted by: siria
Date: November 10, 2017 05:18AM

Quote
JamesD
Yes, the menus to use to go to these items are in TOOLS - PRIVACY - PERMISSIONS. I do not see a way currently to check a table for just one entry.

Just a quick post in hurry - from menus.cfg in KM1.6

P&ermissions{
Co&okies=ID_COOKIE_PERM
&Popups=ID_POPUP_PERM
Im&ages=ID_IMAGE_PERM
}

Vie&w Data{
View Co&okies=ID_COOKIES_VIEWER

To see all exceptions for a single domain isn't possible except with extensions like ExException or PageInfo (great function, should be native!)



Edited 1 time(s). Last edit at 11/10/2017 05:20AM by siria.

Options: ReplyQuote
Re: Would like a way to zoom... / javascript site exceptions
Posted by: rodocop
Date: November 10, 2017 05:53AM

Quote
JamesD
rodocop
I know your stuff has much more than the original. The page info is something that you added?

This was job made by naruman for his 74+1 build and it was still working in 75 - but not in 76.

I failed in my own attempts to recreate this stuff (along with AdBlock Plus GUI for Blocking page items) so only 75 Pro has these options (and sure - 74+1 by naruman)


Latest Release KM75.1 Latest dev KM76RC ||| Visit The K-Meleon Place and join me there!
Old good stuff: KM-1.6db+NS © dugbugoffice // KM-16-S2014 © Fred // KM-1.6beta2.6 © JamesD // KM Twin+ © rodocop // KM 1.8.24.22 © adodupan

RECOMMENDED! K-Meleon 76 Pro ==» Download portable: 7zip or EXE =//= Discuss on forum
K-Meleon 75.1 Pro: Download =//= Discuss || Portable Flash plugin (x86/x64 DLLs)



Edited 1 time(s). Last edit at 11/10/2017 05:54AM by rodocop.

Options: ReplyQuote
Re: Would like a way to zoom... / javascript site exceptions
Posted by: anonymous
Date: November 10, 2017 08:11AM

@JamesD
You want about:permissions with additional values for "image" and "script" on the right side?

Options: ReplyQuote
Pages: 12Next
Current Page: 1 of 2


K-Meleon forum is powered by Phorum.