CrossRider's "appAPI.tabs" is undefined - crossrider

I have used the most basic demo:
appAPI.tabs.create('http://www.example.com');
And i saw on dev tools that "appAPI" doesn't have tabs at all.
I'm using chrome Version 33.0.1750.117 m
All other api functionality works fine.

O.k. it was a stupid mistake,
I needed to use this api in "background" scope.
Now it works fine.

Related

Can you run a version of vscode inside the browser without a server?

Is there any way to run a version of VS Code inside a browser without a server? (inside a React or Angular app). Something like an enhanced version of the monaco editor.
Of course that means it will have some missing functionalities.
If not, are there any other options?
Try this https://securingsincity.github.io/react-ace/
its something of the same king what you want
As far as I could find, it is possible to run VSCode in the browser (since we have vscode.dev), but there doesn't seem to be anyway to deploy it yourself yet?
This Github issue is probably what you want, but there isn't any information there (or on the repo) yet.
It does strongly suggest that https://github.com/microsoft/vscode is the version used for vscode.dev, so there might be things to be found there, until official instructions/embedding is possible.
I think it depends on how you treat vscode.
if it is just a editor software, there'll be a lot of .
For you customerization purpose, it sounds something like 'https://github.com/cdr/code-server'
Not sure if it helps, but you can try looking up gitpod.io. It opens up a visual studio code instance on your browser with options of installing extensions as well.
Use the link like gitpod.io/#https://github.com/username/repo-name
You can possibly use Gitpod self-host, https://github.com/gitpod-io/gitpod or https://github.com/gitpod-io/openvscode-server they both have documentation on how to create your own version of VSCode for the web, however, as I've never tried to create one myself, I don't know if it accomplishes your specific use case.

Are there apps built on top of VSCode open source base?

VSCode has a very customizable UI with Activity Bar, Sidebar, Tabs, Status Bar etc (https://code.visualstudio.com/docs/getstarted/userinterface); customizable via extensions and seems to have been developed without any of the common web frameworks (https://github.com/microsoft/vscode/issues/99845).
It is well maintained, works in different OSes and has automatic updates.
Even if we remove the code-editor part, there is a lot of work in that.
This makes me wonder if it is possible to write a totally different app (not a code editor) on top of VSCode. For example a Slack-like messaging app, an Obsidian-like knowledge base app, etc.
Is it possible? Are there apps built on top of this code? Have I missed an important point that makes this idea unviable?
EDIT:
Some have pointed a very valid point. Some of what I mentioned here as VSCode features are really Electron features that VSCode inherits. Having developed an Electron app (5yrs ago) I see many things in VSCode that are not in Electron (but maybe my concept of Electron is wrong).
I want to emphasize that VSCode UI (bars, tabs, etc) + its extensibility seems to be a valid development framework. And I am ignorant of anything in this sense.
EDIT (jan/2023):
I guess we can add StackBlitz as a product that just did that.
I think your question is very valid and I was wondering the same thing, so thanks for asking it.
One thing that VS Code gives you that Electron doesn't is a distribution model - the marketplace and how new versions of your app can be detected and downloaded automatically etc. This is a big deal.
I think the disadvantages are that a very fancy UX may not be possible directly - but you have to "work around" by putting HTML within a Web View perhaps. This is just my guess and I haven't directly tried it.
To answer your question - the only one I am aware of is Thunder Client - so think of Postman - but as a VS Code plugin.
See also https://stackoverflow.com/a/67069697/314780 , which points to Eclipse Theia which uses parts from Visual Studio Code (i.e "Code - OSS") - https://theia-ide.org/ . The site links to a number of IDE-style apps built on top of it.
VS Code is an electron app. You might want to research what electron is – because you mention it: The Slack app is built on that same framework.
So, you've just invented something that already is done, very widely, in practice.

RTCMultiConnection scalable screenshare

I am working on a project to create a scalable screen sharing application using WebRTC. I started with RTCMultiConnection library, which seems excellent, and stumbled upon the following:
https://rtcmulticonnection.herokuapp.com/demos/Video-Scalable-Broadcast.html
this example includes screensharing, but doesn't work at all.
https://rtcmulticonnection.herokuapp.com/demos/Screen-Sharing.html
this one works, but not scalable
attempt to simply rework one code into another fails, seemingly scalable screenshare works in a completely different way from scalable video. Anyone was able to make it work?
Thanks for any directions at inputs!
P.S.: I am fine even if this works only in Chrome. I will pack this into Electron anyway so browser compatibility will never be a problem.
Here is Scalable-Screen-Broadcast demo:
https://rtcmulticonnection.herokuapp.com/demos/Scalable-Screen-Broadcast.html
And here it its source:
https://github.com/muaz-khan/RTCMultiConnection/blob/master/demos/Scalable-Screen-Broadcast.html
The demo supports both Chrome & Firefox.

Using FreeType extension in GWT?

I'm trying to use the freetype extension in my project, and it works fine in Desktop and Android, but gives a ClassDefNotFoundException in HTML5. I know it's not imported/inherited right, but both freetype.jar and freetype-sources.jar are in its build path.
What needs to be done to get this working?
It does not work with gwt and they are not going to fix it. Take a look at this issue:
issue
"Project Member #1 badlogicgames
Extensions relying on native code (gdx-audio, gdx-bullet, gdx-image, gdx-freetype) can not be ported to HTML5 i'm afraid."

Cannot get Google Analytics Plugin to Work with PhoneGap 2.0

I had been using PhoneGap 1.9 for a while and was successfully using the Google Analytics Plugin.
I recently upgraded to PG 2.0 (so that I could use the new Urban Airship plugin) and now my Google Analytics seems to have stopped functioning.
Unfortunately, I think it has something to do with the initialization of the plugin via JavaScript. After some frustration I got my app to finally compile. But, my app pretty much just stops responding after the Google Analytics plugin is initialized in my JavaScript.
I wish I could give you guys some error messages or something, but I am getting no compiler errors and I am getting no JavaScript errors. The app just does not respond when I use the following two lines:
g_objGoogleAnalytics = window.plugins.googleAnalyticsPlugin;
g_objGoogleAnalytics.startTrackerWithAccountID("UA-XXXXXXXX-X");
If I comment these two lines out, everything else in the app works like a charm.
Has anyone got the Google Analytics plugin working under PG 2.0? If so, any advice or steps would be greatly appreciated.
UPDATE: I added some error checking with try/catch and the console log now states "undefined is not an object" whenever I execute the above two lines of code.
I found the answer myself. kieranshaw on github changed the keyword "PhoneGap" to "codova" in the JS file and that seemed to mix the issue. You can see the changes here: https://github.com/kieranshaw/phonegap-plugins/commit/cc4424410869912ff278de0228a6c328b1296fbe
Here's a way to implement GA on PG without plug-ins, though there are limitations as indicated in the solution: How to use Google Analytics with Phonegap without a plugin?