Page 16 of 17
Re: Chromium WebGadget v3
Posted: Thu May 11, 2023 8:39 pm
by JHPJHP
Updated:
-
various improvements to the framework
- improved fullscreen script:
CrWG_Player.pb
- added fullscreen script:
CrWG_TabBar.pb

Re: Chromium WebGadget v3
Posted: Fri May 12, 2023 12:08 am
by skinkairewalker
Can we currently compile Chromium WebGadget on x86?
Re: Chromium WebGadget v3
Posted: Mon May 15, 2023 5:37 pm
by JHPJHP
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

Re: Chromium WebGadget v3
Posted: Tue May 16, 2023 11:54 pm
by JHPJHP
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.
Re: Chromium WebGadget v3
Posted: Sun May 21, 2023 6:35 pm
by JHPJHP
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.
Re: Chromium WebGadget v3
Posted: Mon May 22, 2023 8:18 pm
by JHPJHP
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.

Re: Chromium WebGadget v3
Posted: Tue May 23, 2023 1:11 pm
by blueb
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.
Re: Chromium WebGadget v3
Posted: Tue May 23, 2023 4:03 pm
by JHPJHP
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.

Re: Chromium WebGadget v3
Posted: Wed May 24, 2023 11:54 pm
by JHPJHP
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.

Re: Chromium WebGadget v3
Posted: Thu May 25, 2023 3:58 pm
by ❤x1
Given your recent productivity, I feel I should tell you that you are allowed to sleep. You know that, right?
Re: Chromium WebGadget v3
Posted: Fri May 26, 2023 2:01 am
by JHPJHP
Hi ❤x1,
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.

Re: Chromium WebGadget v3
Posted: Mon May 29, 2023 6:14 am
by JHPJHP
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.

Re: Chromium WebGadget v4
Posted: Fri Jun 02, 2023 2:48 am
by JHPJHP
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.
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
NOTE: Reviewing the examples should provide most of the information needed to update existing programs or create new ones.
Re: Chromium WebGadget v4
Posted: Sat Jun 03, 2023 9:15 pm
by JHPJHP
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
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
NB*: Free executables (x86/x64) were updated and can be downloaded from My PureBasic Stuff; see FREE STUFF.
Re: Chromium WebGadget v4
Posted: Sun Jun 04, 2023 9:29 am
by Caronte3D
JHPJHP wrote: Sat Jun 03, 2023 9:15 pm
This should be my last post for a while concerning
CrWG;
Already too much effort in this beautiful project.
Now you can pass to the next one
