QB64 Phoenix Edition
qbjs bbcode now available! - Printable Version

+- QB64 Phoenix Edition (https://staging.qb64phoenix.com)
+-- Forum: Official Links (https://staging.qb64phoenix.com/forumdisplay.php?fid=16)
+--- Forum: Announcements (https://staging.qb64phoenix.com/forumdisplay.php?fid=18)
+--- Thread: qbjs bbcode now available! (/showthread.php?tid=1716)

Pages: 1 2


qbjs bbcode now available! - grymmjack - 06-03-2023

You can now use [qbjs] bbcode in your posts to embed qbjs.org code and play with it directly in the thread.

What is qbjs?
QBJS is an opensource project created by @dbox

QBJS is an implementation of the Basic programming language for the web, with multimedia support and easy sharing of programs. It aims to be compatible with QB64, which in turn implements the same dialect as the classic QBasic.

Support for browser APIs is built-in as of version 0.3.0-beta; a game engine is included separately.

Check it out on the qbjs GitHub

How do I use it?

  1. Go to https://qbjs.org
  2. Write some code
  3. Click the share button
  4. Copy the share link from the dialog to clipboard
  5. In forum use CTRL-SHIFT-S to switch to source mode (for whitespace preservation)
  6. Type: [qbjs]
  7. Paste from clipboard
  8. Type: [/qbjs]

Like this:

[Image: qbjs-share.png]


Anything you've made in qbjs.org IDE can be embedded in the new [qbjs] bbcode. You simply click the share button in qbjs.org, and copy the text and insert it between [qbjs] and [/qbjs] -- or you can just paste your share link from qbjs.org, select it, and click the QBJS button in the toolbar to wrap it in the new [qbjs] bbcode.

Here is an example:


(click the Play button to RUN it)

YOU CAN DO ALMOST ANYTHING YOU CAN DO IN QBASIC and QB64!
See: QBasic Language Support in QBJS
And: QBJS Supported Keywords (includes QBASIC and QB64, etc.)

Learn More:


RE: qbjs bbcode now available! - vince - 06-03-2023




very nice, go team Steve!


RE: qbjs bbcode now available! - mnrvovrfc - 06-03-2023

Pretty cool, this would increase the interest generally in QB64, not necessarily in any "one product".

Good job. Notice now the icon which is the most left-hand-side, to insert QBJS code into the post.

grymmjack congratulations on your promotion to admin!


RE: qbjs bbcode now available! - grymmjack - 06-03-2023

(06-03-2023, 04:04 PM)mnrvovrfc Wrote: Pretty cool, this would increase the interest generally in QB64, not necessarily in any "one product".

Yes exactly! That's the hope Smile

(06-03-2023, 04:04 PM)mnrvovrfc Wrote: Good job. Notice now the icon which is the most left-hand-side, to insert QBJS code into the post.

grymmjack congratulations on your promotion to admin!

Thank you @mnrvovrfc !

Happy to help lend a hand.


RE: qbjs bbcode now available! - RhoSigma - 06-03-2023

Nice addition and clean optic implementation.

One thing, annoying me (maybe only me), once you've started a QBJS program and then leaving the thread either by clicking a link, browser favorite shortcut or browser back button, the browser pops up a "Do you really wanna leave the page" (Firefox). It happens also when the program has finished or was stopped. I would understand it to happen as long as a program is still running, but not after it has finished or was stopped again, maybe this could be changed. However, no rush, it's probably just my perfectionism comming into my way here. Big Grin


RE: qbjs bbcode now available! - grymmjack - 06-03-2023

Cheers @RhoSigma

I don't know if there is anything we can do about this, @dbox does it do this as part of it's design?

@RhoSigma I did see though that you can disable this globally in Firefox with about:config


RE: qbjs bbcode now available! - RhoSigma - 06-03-2023

(06-03-2023, 07:11 PM)grymmjack Wrote: Cheers @RhoSigma

I don't know if there is anything we can do about this, @dbox does it do this as part of it's design?

@RhoSigma I did see though that you can disable this globally in Firefox with about:config

Thanx, that works perfect and it eleminates this annoying popup once and forever on every page.


RE: qbjs bbcode now available! - dbox - 06-03-2023

(06-03-2023, 07:04 PM)RhoSigma Wrote: Nice addition and clean optic implementation.

One thing, annoying me (maybe only me), once you've started a QBJS program and then leaving the thread either by clicking a link, browser favorite shortcut or browser back button, the browser pops up a "Do you really wanna leave the page" (Firefox). It happens also when the program has finished or was stopped. I would understand it to happen as long as a program is still running, but not after it has finished or was stopped again, maybe this could be changed. However, no rush, it's probably just my perfectionism comming into my way here. Big Grin

That was put in place to try to help folks not lose their edits by accidently navigating away from the page before they meant to.

In the embedded context on the forum though, yeah, that will get annoying.  I think what I will do is put together a quick patch that will detect whether it is embedded and, if so, disable that popup from triggering.


RE: qbjs bbcode now available! - CharlieJV - 06-03-2023

(06-03-2023, 02:55 PM)grymmjack Wrote: ...snip...

If I happen to do anything with a QBJS program embedded in a thread of discussion (even just run it), the moment I try to get out of that thread of discussion (back button, whatever), my browser annoyingly asks me if I want to leave the site.  That is going to drive me to drink.

Otherwise, cool, and should be setup in the wiki so that examples can be run, right there.  (Well, after there's a fix for this annoying "Leave site?" prompt.)

   


RE: qbjs bbcode now available! - dbox - 06-03-2023

(06-03-2023, 08:21 PM)dbox Wrote:
(06-03-2023, 07:04 PM)RhoSigma Wrote: Nice addition and clean optic implementation.

One thing, annoying me (maybe only me), once you've started a QBJS program and then leaving the thread either by clicking a link, browser favorite shortcut or browser back button, the browser pops up a "Do you really wanna leave the page" (Firefox). It happens also when the program has finished or was stopped. I would understand it to happen as long as a program is still running, but not after it has finished or was stopped again, maybe this could be changed. However, no rush, it's probably just my perfectionism comming into my way here. Big Grin

That was put in place to try to help folks not lose their edits by accidently navigating away from the page before they meant to.

In the embedded context on the forum though, yeah, that will get annoying.  I think what I will do is put together a quick patch that will detect whether it is embedded and, if so, disable that popup from triggering.

Ok, the update is in place.  This prompt should go away point forward.  If you still see the prompt on pages you've visited before, you might need to right click in the QBJS window and select "Reload Frame" to make sure the browser is loading the latest version.