Chromium WebGadget v4
Re: Chromium WebGadget v3
Updated:
- various improvements to the framework
- improved fullscreen script: CrWG_Player.pb
- added fullscreen script: CrWG_TabBar.pb
- various improvements to the framework
- improved fullscreen script: CrWG_Player.pb
- added fullscreen script: CrWG_TabBar.pb
Last edited by JHPJHP on Fri Jun 02, 2023 2:35 pm, edited 7 times in total.
- skinkairewalker
- Enthusiast
- Posts: 635
- Joined: Fri Dec 04, 2015 9:26 pm
Re: Chromium WebGadget v3
Can we currently compile Chromium WebGadget on x86?
Re: Chromium WebGadget v3
Hi skinkairewalker,
Yes, but a 32-bit compiled executable can only run in an x86 Windows environment; same for a 64-bit compiled executable.
----------------------------------------------
Updated:
- various framework optimizations
- various example improvements
- squashed a couple bugs
Yes, but a 32-bit compiled executable can only run in an x86 Windows environment; same for a 64-bit compiled executable.
----------------------------------------------
Updated:
- various framework optimizations
- various example improvements
- squashed a couple bugs
Last edited by JHPJHP on Fri Jun 02, 2023 2:35 pm, edited 4 times in total.
Re: Chromium WebGadget v3
Updated:
- renamed Cr_WebSocket_Close to Cr_WebGadget_Close
- removed some framework Procedures
- added some framework Procedures
- modified most framework Procedures
NOTE: Included script by luis: HTMLEncoder / HTMLDecoder; currently used in the example CrWG_TabBar.pb.
Cr_WebGadget_Close
1. Rename Cr_WebSocket_Close to Cr_WebGadget_Close.
2. Cr_WebGadget_Close now requires the crwg_data\hWnd parameter.
3. Each Chromium WebGadget now requires a call to Cr_WebGadget_Close.
Due to the framework changes this is a recommended update.
- renamed Cr_WebSocket_Close to Cr_WebGadget_Close
- removed some framework Procedures
- added some framework Procedures
- modified most framework Procedures
NOTE: Included script by luis: HTMLEncoder / HTMLDecoder; currently used in the example CrWG_TabBar.pb.
Cr_WebGadget_Close
1. Rename Cr_WebSocket_Close to Cr_WebGadget_Close.
2. Cr_WebGadget_Close now requires the crwg_data\hWnd parameter.
3. Each Chromium WebGadget now requires a call to Cr_WebGadget_Close.
Due to the framework changes this is a recommended update.
Re: Chromium WebGadget v3
Updated:
- various improvements to CrWG_TabBar.pb
NOTE: CrWG_TabBar.pb is an advanced example not meant to be used as a replacement browser, but to demonstrate some additional features.
CrWG_TabBar.pb
Improved the algorithm to identify and retrieve a websites favicon.
Added filters to the Target.setDiscoverTargets method.
Numerous other improvements.
- various improvements to CrWG_TabBar.pb
NOTE: CrWG_TabBar.pb is an advanced example not meant to be used as a replacement browser, but to demonstrate some additional features.
CrWG_TabBar.pb
Improved the algorithm to identify and retrieve a websites favicon.
Added filters to the Target.setDiscoverTargets method.
Numerous other improvements.
Re: Chromium WebGadget v3
Updated:
- various improvements to CrWG_TabBar.pb
CrWG_TabBar.pb
Replaced the Runtime.runScript method with Page.addScriptToEvaluateOnNewDocument.
Replaced the algorithm to identify and retrieve a websites favicon.
Improved the History window and the use of icons.
Previously, I spent a day optimizing the Runtime.runScript method and writing a download favicon algorithm. No sooner do I finish and post the update, I find a less complicated solution for script execution and a much simpler method for downloading favicons.
- various improvements to CrWG_TabBar.pb
CrWG_TabBar.pb
Replaced the Runtime.runScript method with Page.addScriptToEvaluateOnNewDocument.
Replaced the algorithm to identify and retrieve a websites favicon.
Improved the History window and the use of icons.
Previously, I spent a day optimizing the Runtime.runScript method and writing a download favicon algorithm. No sooner do I finish and post the update, I find a less complicated solution for script execution and a much simpler method for downloading favicons.
Last edited by JHPJHP on Fri Jun 02, 2023 4:24 pm, edited 6 times in total.
Re: Chromium WebGadget v3
Looking good JHPJHP.
Wishing to try out the new features, I downloaded the EXE version.
The TabBar sample worked well , but the ChartJS sample returns 'file not found'.
It looks as if the sample requires files that are located in my temporary folder.
Of course there aren't any.
Any hints?
PS - I have a program that cleans out my temporary folder every few days.
Wishing to try out the new features, I downloaded the EXE version.
The TabBar sample worked well , but the ChartJS sample returns 'file not found'.
It looks as if the sample requires files that are located in my temporary folder.
Of course there aren't any.
Any hints?
PS - I have a program that cleans out my temporary folder every few days.
- It was too lonely at the top.
System : PB 6.10 LTS (x64) and Win Pro 11 (x64)
Hardware: AMD Ryzen 9 5900X w/64 gigs Ram, AMD RX 6950 XT Graphics w/16gigs Mem
System : PB 6.10 LTS (x64) and Win Pro 11 (x64)
Hardware: AMD Ryzen 9 5900X w/64 gigs Ram, AMD RX 6950 XT Graphics w/16gigs Mem
Re: Chromium WebGadget v3
Hi blueb,
Thank you for your feedback.
I just realized an option used for testing was still set and has since been removed, but I'm not convinced it's what caused the problem.
It sounds more like an AV issue...
The file created in your Temp folder is flagged as a virus and removed before the program can establish a lock.
Thank you for your feedback.
I just realized an option used for testing was still set and has since been removed, but I'm not convinced it's what caused the problem.
It sounds more like an AV issue...
The file created in your Temp folder is flagged as a virus and removed before the program can establish a lock.
Last edited by JHPJHP on Fri Jun 02, 2023 2:28 pm, edited 2 times in total.
Re: Chromium WebGadget v3
Updated:
- renamed CrWG_TabBar.pb to CrWG_Browser.pb
- changes to DevTools Event order in CrWG_Browser.pb and CrWG_Player.pb
DevTools Event Order
Plays an important part in not only optimized script execution but may determine if some scripts get executed.
Calling the Runtime.enable method will not always trigger an event; a simple solution was to execute it last in the event chain.
The example CrWG_Browser.pb has been updated with improvements to the address bar.
1. Doubles as a search bar.
2. Improved Navigation and History buttons.
3. History window tracks current index.
- renamed CrWG_TabBar.pb to CrWG_Browser.pb
- changes to DevTools Event order in CrWG_Browser.pb and CrWG_Player.pb
DevTools Event Order
Plays an important part in not only optimized script execution but may determine if some scripts get executed.
Calling the Runtime.enable method will not always trigger an event; a simple solution was to execute it last in the event chain.
The example CrWG_Browser.pb has been updated with improvements to the address bar.
1. Doubles as a search bar.
2. Improved Navigation and History buttons.
3. History window tracks current index.
Last edited by JHPJHP on Fri Jun 02, 2023 2:31 pm, edited 4 times in total.
Re: Chromium WebGadget v3
Given your recent productivity, I feel I should tell you that you are allowed to sleep. You know that, right?
Re: Chromium WebGadget v3
Hi ❤x1,
Thank you for your post.
Updated:
- removed script not allowing profiles on network shares
- moved two Events from examples to framework Procedures
- added new options
-- #Cr_WebGadget_Network_Warning_Override: Whether or not the browser should warn if the profile is on a network share.
-- #Cr_WebGadget_User_Agent_Override: A string used to override the default user agent with a custom one.
-- #Cr_WebGadget_Language_Code_Override: Two letter language code from ISO-639.
-- #Cr_WebGadget_Enable_Guest_Mode: Causes the browser to launch directly in guest mode.
-- #Cr_WebGadget_Enable_Auto_Accept: Bypass dialog prompting permission to capture camera & microphone.
-- #Cr_WebGadget_Enable_Dark_Mode: Force dark mode on websites that support it.
-- #Cr_WebGadget_Enable_Night_Mode: Forces the night mode to be enabled.
-- #Cr_WebGadget_Enable_Screen_Support: Required for the two new framework Procedures.
Thank you for your post.
--------------------------------Edgar Allan Poe Suspense Essay wrote:“Sleep, those little slices of death — how I loathe them.” ― Edgar Allan Poe.
Updated:
- removed script not allowing profiles on network shares
- moved two Events from examples to framework Procedures
- added new options
-- #Cr_WebGadget_Network_Warning_Override: Whether or not the browser should warn if the profile is on a network share.
-- #Cr_WebGadget_User_Agent_Override: A string used to override the default user agent with a custom one.
-- #Cr_WebGadget_Language_Code_Override: Two letter language code from ISO-639.
-- #Cr_WebGadget_Enable_Guest_Mode: Causes the browser to launch directly in guest mode.
-- #Cr_WebGadget_Enable_Auto_Accept: Bypass dialog prompting permission to capture camera & microphone.
-- #Cr_WebGadget_Enable_Dark_Mode: Force dark mode on websites that support it.
-- #Cr_WebGadget_Enable_Night_Mode: Forces the night mode to be enabled.
-- #Cr_WebGadget_Enable_Screen_Support: Required for the two new framework Procedures.
Last edited by JHPJHP on Fri Jun 02, 2023 4:24 pm, edited 4 times in total.
Re: Chromium WebGadget v3
Updated:
- CrWG_Browser.pb
-- added Browser Themes
-- added Search Engines
-- various cosmetic improvements
-- squashed a couple bugs
- framework changes and improvements
Browser Themes and Search Engines: Available from the ellipse (...) Options button.
- CrWG_Browser.pb
-- added Browser Themes
-- added Search Engines
-- various cosmetic improvements
-- squashed a couple bugs
- framework changes and improvements
Browser Themes and Search Engines: Available from the ellipse (...) Options button.
Last edited by JHPJHP on Fri Jun 02, 2023 4:23 pm, edited 5 times in total.
Re: Chromium WebGadget v4
The Chromium WebGadget has been updated to version 4
There have been numerous changes, mostly minor improvements, but a couple major updates to warrant a version change.
The ContainerGadget hosting the browser has been replaced with a dynamically created container better suited for the environment.
This update required various changes to the framework and examples, one of which is a new method for opening a Chromium WebGadget.
Another update consisted of moving the Network Event scripts to the framework, reducing the required code for a working example.
In addition, a few framework options have been added and most of the existing ones have been renamed to be more intuitive.
NOTE: Reviewing the examples should provide most of the information needed to update existing programs or create new ones.
There have been numerous changes, mostly minor improvements, but a couple major updates to warrant a version change.
The ContainerGadget hosting the browser has been replaced with a dynamically created container better suited for the environment.
This update required various changes to the framework and examples, one of which is a new method for opening a Chromium WebGadget.
Another update consisted of moving the Network Event scripts to the framework, reducing the required code for a working example.
In addition, a few framework options have been added and most of the existing ones have been renamed to be more intuitive.
Code: Select all
#Cr_WebGadget_Override_Profile_Location
#Cr_WebGadget_Override_Default_Browser
#Cr_WebGadget_Override_User_Agent
#Cr_WebGadget_Override_Language_Code
#Cr_WebGadget_Override_Network_Warning
#Cr_WebGadget_Override_Camera_Prompt
#Cr_WebGadget_Enable_Guest_Account
#Cr_WebGadget_Enable_Zero_Account
#Cr_WebGadget_Enable_Multiple_Tabs
#Cr_WebGadget_Enable_Screen_Support
#Cr_WebGadget_Enable_Dark_Mode
#Cr_WebGadget_Enable_Night_Mode
#Cr_WebGadget_Idle_Timeout_Minutes
#Cr_WebSocket_Listen_Port_Number
#Cr_WebSocket_Listen_Port_Random
#Cr_WebSocket_Override_Port_InUse
#Cr_WebSocket_Enable_DevTools_Protocol
#Cr_WebSocket_Enable_DevTools_Events
#Cr_WebSocket_Enable_DevTools_Debugger
Last edited by JHPJHP on Sun Jun 04, 2023 3:36 am, edited 1 time in total.
Re: Chromium WebGadget v4
This should be my last post for a while concerning CrWG; the changes made today stripped away most of the complicated code.
With exception CrWG_Browser.pb, CrWG_Command.pb and CrWG_Player.pb, written to demonstrate CrWG capabilities.
---------------------------------------------------------
Updated:
- moved common script elements to the framework
- changed some default framework options
- improved the profile location script
- improved the CLS location script
- squashed a PATH bug
Default profile directory and some example stuff: C:\Users\[NAME]\AppData\Roaming\CrWG\.
User-defined command line switches: Same location as executable, switches folder.
Simplest example using the Chromium WebGadget
- the DevTools Protocol is enabled by default, but can easily be disabled
NB*: Free executables (x86/x64) were updated and can be downloaded from My PureBasic Stuff; see FREE STUFF.
With exception CrWG_Browser.pb, CrWG_Command.pb and CrWG_Player.pb, written to demonstrate CrWG capabilities.
---------------------------------------------------------
Updated:
- moved common script elements to the framework
- changed some default framework options
- improved the profile location script
- improved the CLS location script
- squashed a PATH bug
Default profile directory and some example stuff: C:\Users\[NAME]\AppData\Roaming\CrWG\.
User-defined command line switches: Same location as executable, switches folder.
Simplest example using the Chromium WebGadget
- the DevTools Protocol is enabled by default, but can easily be disabled
Code: Select all
Enumeration
#MainWindow
EndEnumeration
#Cr_WebSocket_Enable_DevTools_Protocol = #False
IncludeFile "..\Shared Files\includes\Cr_WebGadget.pbi"
If OpenWindow(#MainWindow, 0, 0, 800, 500, "Chromium WebGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
crwg_data.CrWG_DATA
crwg_data\Container = Cr_WebGadget(0, 0, 800, 500, #MainWindow)
crwg_data\StartURL = "https://www.youtube.com"
Cr_WebGadget_Init(crwg_data, #PB_Compiler_Filename)
Repeat
Event = WaitWindowEvent()
Select Event
Case #PB_Event_CloseWindow
Cr_WebGadget_Close(crwg_data\hWnd)
Break
EndSelect
ForEver
EndIf
Last edited by JHPJHP on Mon Jun 05, 2023 4:25 pm, edited 1 time in total.