Programatically clicking Flash elements on a page with JQuery - javascript

I am trying to work on a plugin for Chrome that automates clicking on various buttons/links/etc using JQuery, and have had success in the past using JQuery to manipulate the DOM tree for similar projects.
For my latest plugin, I have run up against a wall. The elements that I am trying to click on seem to be Flash objects, because when I right click on the buttons to try to inspect them with FireBug, I get the Adobe Flash Player context menu. My question is, is it possible to use JQuery to programatically click on Flash elements, and if so, how would I go about approaching something like that?
Thanks

See https://stackoverflow.com/a/10947293/988587
Seems to be difficult without selenium : http://forums.anandtech.com/showthread.php?t=2257304

Related

Controlling JavaScript from user's end

I am working on a website where I have to repetitively attach an image file one by one and click submit for it to be uploaded. I looked at site's JavaScript code and found the right buttons, and I even used AHK's COM object tutorial here to click() those buttons using JavaScript. I wanted to know is there any sophisticated way to control webpages using javascripts from user's end on browser other than Internet Explorer?
(I am looking for something better than putting focus on url-bar, and typing javascript:alert())

Is it possible to inject HTML into a website to force-enable scrolling?

Okay, so this is a bit of an odd question. Facebook is trying to remove the feature that hides your profile from search, but requires you hit an accept button before they can remove it. I like my privacy, so instead I just used ABP to hide the dialog box and give me back access to the page. The problem is that scrolling has been disabled, so while I can interact with the content that's currently visible, I can't scroll down. Is there a way to inject HTML or JS that would force-enable scrolling?
Seems as a job for greasemonkey
https://addons.mozilla.org/sv-se/firefox/addon/greasemonkey/
There are similar plugins for other browsers, Chrome have support for users scripts by default but there is a great addon there as well
https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo
Internet Explorer can also offer this by adding Trixie
http://trixie.softpedia.com/
If you don't need it all the time and don't want to go to the effort of making a script you could just edit the html directly using either the developer tools built in to most browsers and inspecting the element.
Just right click what you want to change and select inspect element.
Adam

How to know if something is programmed in Flash or Javascript

I was looking for examples of Javascript games and I came across this. It looks like Flash. I tried looking at the source code, and all I see are a bunch of div tags, but not really any Javascript. I couldn't find the code that actually runs the game.
Is this Flash or Javascript? How can you tell?
It's Javascript.
When you right click it gives you the native browser context menu. Right-clicking anything in Flash will give you a Flash context menu. The only time that method fails is when you get no context menu at all.
Also, highlight the text "Press enter". It uses native text highlighting.
As far as I know is impossible to hide the typical secondary flash context menu telling the version, etc...
I found is using a core.js javascript
Hope it helps.
You can try to disable the plugin of shockwave flash from browser's options. Then refresh page and see, whether 'target flash' disappears. If so then it was flash.

How do I access my Firefox addon toolbar button from the js code?

I am new to Firefox addon development and just figured out how to add a XUL toolbarbutton to the browser's toolbar.
I'm not sure, however, how to get a handle to that button from my js code.
I need to swap the image on the button when certain content is found within a web page.
Just to be clear, my issue is not locating the page content, but making my toolbarbutton "react" to it.
Thanks!
Having a similar issue, I managed to get a mouseover event attached to a button. See my thread here.
It's a bit complicated. You have to add addEventListener to the xul node.

Show window inside any web page

I want to implement a utility for myself that should provide a small console where I can execute random JS in any browser (much like Firebug's console - I don't reinvent the wheel, I just want to do something I need and just have fun doing it).
So the usage use-case would be this:
Click a bookmarklet from any browser.
It shows dialog (much like jQuery dialog or similar) with text area and couple of buttons.
User enter a JS in the text area.
User clicks a button and it gets executed.
User closes the dialog.
I don't know how I can display nice dialog on any web page (Gmail, news, static pages, whatever).
I think it would be possible to create a jQuery dialog (or other library) and show it on the page. But it could lead to a lot of issues as the dialog might conflict with page CSS, JS and so on.
So the question is how to display a custom dialog on any web page from all (major) browsers using JavaScript.
The NOTES: I don't want to have a popup window. IFRAME would be ok but we cannot use it as the web page's DOCTYPE might not support it.
Thanks,
Dmitriy.
http://getfirebug.com/lite.html
Works in IE, Opera, Safari - basically gives you firebug's functionality in any browser.
bookmarklets are pieces of JS code, so you can basically develop any kind of JS program and use it via bookmarklet... just do what you would do normally. check how other bookmarklets work.
regarding the window display - use lightbox-like effect (DIV layered over other content).

Categories

Resources