Page 3 of 4
Re: Embed JS Framework into PureBasic
Posted: Mon Aug 15, 2016 9:50 am
by JHPJHP
Updated:
- added 1 Flot Chart example
--
Flot_Series.pb

Re: Embed JS Framework into PureBasic
Posted: Wed Aug 31, 2016 7:51 pm
by JHPJHP
Updated:
- added another framework:
Data-Driven Documents
-- Includes\d3js_stackedbars.pbi
-- Includes\D3JS\d3.v3.min.js, d3.stackedbars.js, stackedbars.css
- added 1 example
-- D3JS_StackedBars.pb
This framework was added based on a question asked
here.
In order for this example to be useful the JavaScript "test data generator" function (bumpLayer) in the file
Includes\D3JS\d3.stackedbars.js would need to be replaced with user-defined data.
Re: Embed JS Framework into PureBasic
Posted: Fri Sep 02, 2016 5:16 am
by JHPJHP
Updated the example
D3JS_StackedBars.pb, merging the JS file
d3.stackedbars.js (removed) for better control over the various parameters.
- various changes were made to more easily replace the "test data generator" function (previously
bumpLayer now
getValues) with a user-defined array
NB*: After modifying the "Layers / Samples" SpinGadget values press the "Generate Random Data" ButtonGadget to reflect the new settings.

Re: Embed JS Framework into PureBasic
Posted: Tue Sep 13, 2016 2:13 pm
by djes
Hi JHPJHP, the download link seems broken...
Re: Embed JS Framework into PureBasic
Posted: Tue Sep 13, 2016 3:03 pm
by RSBasic
Re: Embed JS Framework into PureBasic
Posted: Tue Sep 13, 2016 3:39 pm
by djes
Thank you ^^
Re: Embed JS Framework into PureBasic
Posted: Tue Sep 13, 2016 9:38 pm
by JHPJHP
Hi djes,
Sorry for the inconvenience, it seems that all my links are corrupted; I think it happened when I tried reorganizing my Dropbox account.
Until I have time to correct the problem
RSBasic is generously providing a
backup location to many PureBasic downloads.
Re: Embed JS Framework into PureBasic
Posted: Tue Sep 13, 2016 10:19 pm
by djes
No problem, thank you for all your good job !
Re: Embed JS Framework into PureBasic
Posted: Wed Sep 14, 2016 8:04 pm
by JHPJHP
Updated:
- removed 1 example: Geolocation.pb (geolocation.pbi)
- updated 3 examples: VideoJS_Player.pb, VideoPlayer.pb, VideoPlayer_Custom.pb
NB*: All download links have now been fixed.
Re: Embed JS Framework into PureBasic
Posted: Thu Apr 27, 2017 7:43 pm
by JHPJHP
Updated:
- added a
Linux version of the download
- added an
OSX version of the download
All downloads are available from the first post.
Problems with the following
Linux and
OSX examples:
-
Pending/AS3_Webcam.pb: Missing Plug-in [
Linux & OSX ]
-
Pending/PDFJS_Viewer.pb: Open File (icon) not working [
OSX ]
-
Pending/TurnJS_Double.pb: Unknown issue, only 1 page returned [
Linux & OSX ]
-
Pending/VideoJS_Player.pb: Problem with
videoPlayer element from
Includes/videojs_player.pbi [
OSX ]
-
Pending/Video_Player.pb: Problem with
videoPlayer element from
Includes/videoplayer.pbi [
OSX ]
-
Pending/VideoPlayer_Custom.pb: Problem with
videoPlayer element from
Includes/videoplayer_custom.pbi [
OSX ]
NB*: Various OSX examples display a flashing screen when redrawn; see D3JS_StackedBars.pb.
NOTE:
1. Move the "Pending" examples to the main folder before executing.
2. Enabled Debug mode before executing the video examples to more easily cancel the process.
3. Helpful sites with various webkit preferences:
--
https://developer.android.com/reference ... tings.html
--
https://github.com/adobe/webkit/blob/ma ... ferences.h
--
https://opensource.apple.com/source/Web ... c/WebView/
Code: Select all
WebkitSettings = webkit_web_settings_new()
g_object_set(WebkitSettings, "enable-developer-extras", #True, #Null)
g_object_set(WebkitSettings, "enable-java-applet", #True, #Null)
g_object_set(WebkitSettings, "enable-plugins", #True, #Null)
g_object_set(WebkitSettings, "enable-scripts", #True, #Null)
g_object_set(WebkitSettings, "enable-file-access-from-file-uris", #True, #Null)
g_object_set(WebkitSettings, "enable-private-browsing", #True, #Null)
g_object_set(WebkitSettings, "enable-spell-checking", #True, #Null)
g_object_set(WebkitSettings, "enable-universal-access-from-file-uris", #True, #Null)
g_object_set(WebkitSettings, "enable-dns-prefetching", #True, #Null)
g_object_set(WebkitSettings, "enable-webaudio", #True, #Null)
g_object_set(WebkitSettings, "enable-webgl", #True, #Null)
g_object_set(WebkitSettings, "enable-fullscreen", #True, #Null)
g_object_set(WebkitSettings, "enable-xss-auditor", #True, #Null)
g_object_set(WebkitSettings, "javascript-can-access-clipboard", #True, #Null)
g_object_set(WebkitSettings, "javascript-can-open-windows-automatically", #True, #Null)
webkit_web_view_set_settings(GadgetID(0), WebkitSettings)
Re: Embed JS Framework into PureBasic
Posted: Wed Jun 21, 2017 2:43 pm
by kinglestat
do these links actually work? I get content unavailable when I click those links
Re: Embed JS Framework into PureBasic
Posted: Thu Jun 22, 2017 1:05 am
by acreis
It seems jhpjhp is on vacations and his onedrive is down
Does anyone have backup of their marvels?
Re: Embed JS into PureBasic
Posted: Sun Jul 23, 2017 12:37 pm
by Little John
Hi JHPJHP,
I am interested in this project, and I tried to download the ZIP archive for Windows from the download link in the first post of this thread, but to no avail. I've tried several times, last week and today.
The start always is promising:
Firefox (on Windows 10) opens a URL
https://onedrive.live.com/?authkey=... and I see a symbol of a ZIP folder with the caption "Embed_JS.zip". Up to about 60% of the download, it seems to work fine, then suddenly the download ends with Firefox' error message "Embed_JS.zip - Failed". It's always the same.
Since there is no general problem with my internet connection, I don't know what the problem is. Any idea how I can get your file? I am rather curious about looking into it.
//Edit: People told me via PM (thank you!) that they can download the file. So there seems to be a problem
on my side.

BTW, when using
MS Edge (on Windows 10) instead of Firefox, I encounter exactly the same problem.
Finally, the download was successful with
Chrome on my Android tablet.

Re: Embed JS into PureBasic
Posted: Sun Jul 23, 2017 9:37 pm
by JHPJHP
Hi kinglestat, acreis, Little John,
Sorry about the problems with downloading, I am not sure what the issues might have been; first Drop Box now OneDrive
I have started a website. When I can put more time into completing it, I will probably move all my download links there.
Thank you for the letting me know about the problems.
Re: Embed JS into PureBasic
Posted: Sat May 25, 2019 12:34 am
by JHPJHP
Updated (Windows package):
-
PDFJS to the latest version
- some minor code changes
See a demo of the PDF viewer
here; works just the same in a PureBasic window, from full screen to presentation mode, etc.
PDFJS
Due to the restrictions with Internet Explorer 11 and
Cross-Origin Resource Sharing (CORS), this example can only be executed through a proxy server.
Install
Internet Information Services, then copy the folder
includes\PDFJS to
C:\inetpub\wwwroot\PDFJS;
no configuration required.
Having a PDF load on open can be accomplished by adding a
default value in the file
/web/viewer.js @ LINE 4353.
Code: Select all
defaultUrl: {
value: '',
kind: OptionKind.VIEWER
}