Page 2 of 17
Re: Chromium Edge WebGadget
Posted: Fri Apr 30, 2021 5:30 pm
by JHPJHP
Updated:
-
modified CE_WebGadget_2.pb
- modified the event process to use JSON
- various small optimizations and improvements
CE_WebGadget_2.pb has been updated to process JavaScript events for multiple CE WebGadgets.
NB*: See previous post for an updated code example.

Re: Chromium Edge WebGadget
Posted: Fri Jul 16, 2021 5:44 pm
by JHPJHP
Updated:
- added the option to open internet URLs
- added a new example: CE_WebGadget_5.pb
- some minor code improvements
CE_WebGadget_5.pb
Includes three CE WebGadgets pointing to three seperate URLs.
Chromium Edge WebGadget was originally written to demonstrate how easy it is to include simple but robust (JavaScript, HTML5, CSS3) features into a PureBasic application (i.e. scrolling/marquee text), everything else is experimental.
Re: Chromium Edge WebGadget
Posted: Fri Aug 13, 2021 3:04 am
by JHPJHP
Updated:
-
better stability with non-standardize HTML
- various improvements to code structure
- combined all includes into a single file
- squashed a couple bugs
Rewrote part of the CE_WebGadget_Format Procedure to be less strict with non-standardize HTML.
NB*: Chromium Edge WebGadget free executables were also updated.
Re: Chromium Edge WebGadget
Posted: Thu Aug 26, 2021 12:26 pm
by Morty
Hi JHPJHP
Is there an easy way to call a javascript function with parameters and get back a result? I have looked through your codes (even the html/js) and there are too many functions - so I don't get it.
In your PB-code you use the CE_WebGadget_Post function which refers to your website. And in your examples html/js files you are also refering to it, but with additional parameters.
Am I on the right way? Is this the way that I have to save the scripts on my server and change these proxy/url parameters?
Thanks
Morty
Re: Chromium Edge WebGadget
Posted: Thu Aug 26, 2021 3:22 pm
by JHPJHP
Hi Morty,
CE_WebGadget_1.pb was experimental (not meant for practical use), as were the techniques (proxy, PHP, etc.) used to initiate the JavaScript calls.
JHPJHP wrote:Chromium Edge WebGadget was originally written to demonstrate how easy it is to include simple but robust (JavaScript, HTML5, CSS3) features into a PureBasic application (i.e. scrolling/marquee text), everything else is experimental.
If you're still determined to go down this path, I can provide additional information.
CE_WebGadget_2.pb which captures JavaScript events should probably be your starting point...
I've been doing some work with the
IAccessible interface that I'm hoping can be used to assist with the "experimental" parts of
Chromium Edge WebGadget, but there is still more to be done before it can be implemented; see the following post:
https://www.purebasic.fr/english/viewto ... 51#p573751.
CE_WebGadget_3.pb demonstrates my original intent; a simple way to embed scrolling marquee text/images, not fully supported by the WebGadget, into a PureBasic application.
Re: Chromium Edge WebGadget
Posted: Wed Oct 13, 2021 3:39 pm
by skinkairewalker
works on linux and macos too ?
Re: Chromium Edge WebGadget
Posted: Thu Oct 14, 2021 1:40 am
by JHPJHP
Windows only.
Re: Chromium Edge WebGadget
Posted: Thu Nov 04, 2021 2:43 pm
by Kiffi
Hello JHPJHP,
when I start the code on my (german) system, a dialogue box keeps appearing offering to translate foreign language pages into my language.
With the CommandLineSwitch
--disable-features=Translate you can suppress this dialogue box.
Greetings ... Peter
Re: Chromium Edge WebGadget
Posted: Fri Nov 05, 2021 3:26 am
by JHPJHP
Hi Kiffi,
Thank you for your post; I've added the Command Line Switch you reported (
--disable-features=Translate).
At some point I will update the package to optionally use an external file for Command Line Switches.
In addition, the example
CE_WebGadget_3.pb was updated to exclusively use external HTML files, and a small bug was patched.
NB*: Free executables (x86/x64) can also be downloaded from My PureBasic Stuff; see FREE STUFF.
Re: Chromium Edge WebGadget
Posted: Thu Apr 14, 2022 11:45 pm
by JHPJHP
Updated:
-
added CE_WebGadget.cls
- improved
basic CE_WebGadget
-
numerous minor improvements
CE_WebGadget.cls
Set Command Line Switches from an external file. Remove the leading underscore for file to be active.
NB*: Default file settings currently match the programs internal settings. Activating the file will override the internal settings.
Code: Select all
; List of Chromium Command Line Switches
; https://peter.sh/experiments/chromium-command-line-switches/
; Preserved For Internal Use
; --user-data-dir ; Directory where the browser stores the user profile.
; --window-position ; Specify the initial window position.
; --window-size ; Sets the initial window size.
; --cast-initial-screen-width ; Used to pass initial screen resolution to GPU process.
; --cast-initial-screen-height ; Used to pass initial screen resolution to GPU process.
--homepage="https://duckduckgo.com" ; Specifies which page will be displayed in newly-opened tabs.
--inprivate ; Browse in a secure private window where none of the cache, cookies or history is stored.
--disable-extensions ; Disable extensions.
--disable-notifications ; Disables the Web Notification and the Push APIs.
--disable-sync ; Disables syncing browser data to a Google Account.
--disable-features=Translate ; Comma-separated list of feature names to disable.
--enable-features=msEdgeDeleteBrowsingDataOnExit ; Comma-separated list of feature names to enable.
--no-default-browser-check ; Disables the default browser check.
--no-first-run ; Skip First Run tasks, whether or not it's actually the First Run.
--no-experiments ; Disables all experiments set on about:flags.
--no-pings ; Don't send hyperlink auditing pings.
--no-proxy-server ; Don't use a proxy server, always make direct connections.
--noerrdialogs ; Suppresses all error dialogs when present.
--new-window ; Launches URL in new browser window.
--site-per-process ; Enforces a one-site-per-process security policy.
Re: Chromium Edge WebGadget
Posted: Sun Apr 17, 2022 5:41 am
by JHPJHP
Updated:
-
added command CE_WebGadget_Update()
-
added example CE_WebGadget_ChartJS.pb
CE_WebGadget_Update()
This was the first step to a working
Chart.js example, but it also opened up other possibilities...
Executing the command by itself will refresh the currently loaded webpage.
Executing the command with additional parameters will update the currently loaded webpage.
Code: Select all
*HTML = UTF8(LineChart$)
cewg_data\DataSource = *HTML
cewg_data\DataLength = MemorySize(*HTML)
CE_WebGadget_Update(cewg_data)
Code: Select all
cewg_data\DataSource = ?Marquee_Start
cewg_data\DataLength = ?Marquee_End - ?Marquee_Start
CE_WebGadget_Update(cewg_data)
NOTE: cewg_data\SourceURL cannot be used to update a CE_WebGadget, and should not be modified after CE_WebGadget_Init has been called.
EXCEPTION: Both the original and updated URL start with http:// or https://; see CE_WebGadget_5.pb.
Code: Select all
cewg_data\SourceURL = "https://www.mypurebasicstuff.com"
CE_WebGadget_Update(cewg_data)
CE_WebGadget_ChartJS.pb (
Chart.js)
- animated, resizable, dynamic charts (tooltips, active legend / hide dataset, Randomize data button, etc.)
My first three examples (line, bar, pie) use a different method for randomizing data then the other examples.
This was before I had a working utils.js and understood how to include actions.
NB*: Free executables (x86/x64) can also be downloaded from My PureBasic Stuff; see FREE STUFF.
Re: Chromium Edge WebGadget
Posted: Wed Apr 20, 2022 10:58 pm
by JHPJHP
Updated:
- renamed CE_WebGadget_1.pb to CE_WebGadget_JSE_SSE.pb
- renamed CE_WebGadget_2.pb to CE_WebGadget_JSE.pb
- renamed CE_WebGadget_3.pb to CE_WebGadget_Display.pb
- renamed CE_WebGadget_4.pb to CE_WebGadget_SSE.pb
- renamed CE_WebGadget_5.pb to CE_WebGadget_URL.pb
-
improved CE_WebGadget_JSE_SSE.pb
-
improved CE_WebGadget_JSE.pb
-
improved CE_WebGadget_SSE.pb
JavaScript Events (
JSE): Events generated from the CE WebGadget and received by PureBasic.
Server Sent Events (
SSE): Events generated from PureBasic to a hosted server and received by the CE WebGadget.
Re: Chromium Edge WebGadget
Posted: Wed Apr 20, 2022 11:53 pm
by ricardo
Hi,
Does this need to install anything to work?
Best Regards
Re: Chromium Edge WebGadget
Posted: Thu Apr 21, 2022 12:09 am
by JHPJHP
Hi ricardo,
ricardo wrote:Does this need to install anything to work?
No, but the minimum requirements are Windows OS with Chromium Edge.
Easy enough to test, just download the free executables...
NB*: Free executables (x86/x64) can be downloaded from My PureBasic Stuff; see FREE STUFF.
Re: Chromium Edge WebGadget
Posted: Thu Apr 21, 2022 6:06 pm
by ricardo
JHPJHP wrote: Thu Apr 21, 2022 12:09 am
Hi ricardo,
ricardo wrote:Does this need to install anything to work?
No, but the minimum requirements are Windows OS with Chromium Edge.
Easy enough to test, just download the free executables...
NB*: Free executables (x86/x64) can be downloaded from My PureBasic Stuff; see FREE STUFF.
Hi JHP JHP
I am running Windows 10 with Microsoft Edge Versión 100.0.1185.44. Its sayus that has beinmg developed thanks to Chromium... but if i tried to run your free ejecutables it says Edge Chromium wasnt found. My Edge says its updated.