Install a Plugin in GeckoFX - plugins

Hay, im making a browser and want to attatch a Plugin to my Geckofx browser.
I simply looked how widevine was installed in firefox and made it like that. I copyed the gmp-widevinecdm from the firefox-profilefolder to the profile folder of my browser.
I experimented with these flags and configs
GeckoPreferences.Default("extensions.blocklist.enabled") = False
GeckoPreferences.Default("media.gmp-manager.updateEnabled") = True
GeckoPreferences.Default("media.gmp-widevinecdm.version") = "4.10.1582.2"
GeckoPreferences.Default("media.gmp-widevinecdm.abi") = "x86_64-msvc-x64"
GeckoPreferences.Default("media.gmp-widevinecdm.enabled") = True
GeckoPreferences.Default("media.gmp-widevinecdm.visible") = True
I simply want to implement DRM-support and really dont know anymore what to do :/
:)

Related

Hide graphics using ArcGIS JS API 4.7

With ArcGIS JS API 4.7, is there a way to show/hide graphics per attribute?
There is a property for the graphics called visible, but when I do set it to false myGraphic.visible = false no change occurs.
Any ideas? Thank you.
Can you share an example that reproduces your issue. I just did a test, and I do not see any problem with graphic visibility in v4.7.
Here is an example plunkr:
Live example: Plunker
`function changeGraphicVisibility() {
polygonGraphic.visible = !polygonGraphic.visible;
var spanElement = document.getElementById("visibility");
spanElement.innerHTML = polygonGraphic.visible;
}....`

OSX/Swift Get Frontmost Running Application

I'm new to swift and osx programming in general, and I need help with one thing that I can't seem to find an answer for. I'm trying to get the frontmost application running on a computer through an app. Right now I'm able to detect when a target application opens, but not when it is in front of all other windows or when it goes into the background.
What I have so far is:
var workspace = NSWorkspace.sharedWorkspace()
var applications = workspace.runningApplications
for app in applications {
let x = "LolClient"
if app.localizedName == x {
println("League is open")
}
}
That will just tell me when a target app opens. I just need to identify what app is in front of all others... basically which one is recieving keystrokes etc. What code would I need to do this? Thank you in advance.
I think you want NSWorkspace.shared.frontmostApplication.
NSWorkspace.shared.frontmostApplication
For the name of the app:
NSWorkspace.shared.frontmostApplication?.localizedName

google chrome app script ask to save as userAppPanel

I encounter a problem using UIApplication in google app script, but only on Chrome 18.0.1025.142 m, my application works fine on Firefox 3.6, and also on chrome 16.x.x.
I updated my chrome version to 19.0.1084.56 m. And the problem still occurs.
On Chrome 18.0.1025.142 m and 19.0.1084.56 m, I have the following behaviour:
A blank frame is displayed over my spreadsheet when I try to display the UI Application and I'm asked to perform a "Save As" operation for an object userAppPanel.
On Chrome 16.x.x or Firefox 3.6, I have a UI application with a panel, a textbox and a button.
Here is my application creation code:
// Create my application
var mydoc = SpreadsheetApp.getActiveSpreadsheet();
var myapp = UiApp.createApplication();
myapp.setTitle("Translation selector");
// create panels, text boxes and widgets
var mypanel = myapp.createVerticalPanel();
// Create input boxes and button
var textBoxA = myapp.createTextBox();
textBoxA.setName('Input search filter here').setId('SearchText');
var MyButton = myapp.createButton("Fill the tables");
mypanel.add(textBoxA);
mypanel.add(MyButton);
// create handler to respond to events
var clickHandler = myapp.createServerClickHandler("respondToSubmit");
MyButton.addClickHandler(clickHandler);
clickHandler.addCallbackElement(mypanel);
// assemble everything in app
myapp.add(mypanel);
//mydoc.show(myapp);
//return myapp;
var doc = SpreadsheetApp.getActive();
// show the app
doc.show(myapp);
}
I've a similar issue on Chrome 21.0.1180.89 for OSX. Working with a mail merge script which worked perfectly on a, similar up-to-date, chrome on Win8 just a few hours ago.
I'm pretty sure it's a security issue.
De-authorising the app (under account->security) and then reloading the script and re-authorising it helps. Not sure if it's on a per-browser level or something else..
Kindly Add this Code,
As per your question, It works on chrome.
function saveTextAsFile()
{
var textToWrite = document.getElementById('area').value;
var textFileAsBlob = new Blob([textToWrite], {type:'text/plain'});
var fileNameToSaveAs = "ecc.plist"/*Your file name*/;
var downloadLink = document.createElement("a");
downloadLink.download = fileNameToSaveAs;
downloadLink.innerHTML = "Download File";
if (window.webkitURL != null)
{
// Chrome allows the link to be clicked
// without actually adding it to the DOM.
downloadLink.href =
window.webkitURL.createObjectURL(textFileAsBlob);
}
else
{
// Firefox requires the link to be added to the DOM
// before it can be clicked.
downloadLink.href = window.URL.createObjectURL(textFileAsBlob);
downloadLink.onclick = destroyClickedElement;
downloadLink.style.display = "none";
document.body.appendChild(downloadLink);
}
downloadLink.click();
}
I have some users of a script I've developed, FormEmailer (available in the Script Gallery) that are also having this problem. But we were not able to nail the situation that generates this yet.
Is the spreadsheet you're testing yours? Or is it shared and you're not the owner? Do you have other scripts projects on this same spreadsheet? Are you the owner of all scripts?
(I think it's better if you change you edit your question and I my answer, instead of talking in the "limited" comments).
I have the same problem :
More details about this after a few tests. It seems it is due both to user triggering the script to execute, as well as characteristics of the trigger :
- if the function is called from a custom menu in a spreadsheet, everything works fine for everyone
- if function is called onOpen(), everything works fine for everyone
- if an installable onEdit or onOpen trigger has been set on the function, then everything works fine for the person who set it, and bad for others.
The last behavior is observed whether that person is owner or not.
Basically it seems the only times when it doesn't work well is when someone opens or edits a spreadsheet and the function is triggered by an installable trigger installed by somebody else.
This is a pain.

Jquery img preload not working in FireFox

I recently did a small jQuery snippet that allows me to show a loading img until the real image is loaded.
The snippet seems to work in Safari, Chrome but not FireFox.
FireFox only displays a loading alt and never switches to the loaded image.
Here is the snippet
var loading = $('<img src="/media/ajax-loader.gif" alt="loading" />');
$('.thumbnail').each(function(){
var loadIMG = loading.clone();
$(this).after(loadIMG).load(function(){
$(this).fadeIn('fast');
loadIMG.hide();
}).hide();
});
Any ideas why?
You haven't said what exactly is happing on FF but below can be one of the problem. From jquery documentation
It is possible that the load event
will not be triggered if the image is
loaded from the browser cache. To
account for this possibility, we can
use a special load event that fires
immediately if the image is ready.
event.special.load is currently
available as a plugin.
Here's the link for plugin.
Edit:
Based on comments from load event, try below:
$('.thumbnail').each(function(){
var loadIMG = loading.clone();
$(this).after(loadIMG).load(function(){
$(this).fadeIn('fast');
loadIMG.hide();
}).hide();
if (this.complete) $(this).trigger("load");
});
Of course, the plug-in seems to be doing same thing along with handling some other scenarios as well as.

Is it possible to get document of iframe with iframe_id?

AFAIK,I can achieve this goal by window.frames['frame_name']
but if I only know frame_id,is it possible to get the content too?
You can try it out here:
http://maishudi.com/rte-light-read-only/index.html
btw,is it possible to get location attribute through iframe_id?
I tried long ago but failed.
I think this should do it. It works on (the latest) firefox, safari, camino and opera (mac).
You should still do some testing though (especially in IE)
var iframeObj = document.getElementById("theIframeId");
var documentObj = iframeObj.contentWindow || iframeObj.contentDocument;
var location = documentObj.location.href; // I think this only works if
// the content of the iframe comes
// from the same domain.