Writing Firefox Extension - Detecting New Page?
Mar 18, 2010
I am writing a firefox extension and I need to execute a YQL query everytime the user changes webpage on their browser.For now, all i am concerned with is detecting if their is a webpage change.For example. User is on [URL] then switches to [URL] At this point i need to call a function.So far all i can find is an onload=function()Which is only working once when the browser opens up.
View 1 Replies
ADVERTISEMENT
Nov 8, 2007
This might be more of a firefox extension development question but it has to do with JS so i'll ask here in hopes of finding someone with experience in this.
My extension requires the URL of the image that was right clicked. Meaning I have added a new option in the right-click menu when an image is right-clicked that calls a function in my JS file
JavaScript Code:
imgSrc ();
This function requires the URL of the image that was right clicked to be passed into it. Does anyone know how I would do that?
View 2 Replies
View Related
Mar 20, 2009
I have a website in development that has some similarities to Kaboodle.com. I need a FF/IE toolbar button build that can extract images from a website and populate them into my db for display in my pages. This fucntion will work identical to how kaboodle.com works. I had the firefox buttons developed by some freelances, however they lacked the expertise in javascript to make them work correctly.
I need advise on where to turn to so that I can get a quality finished product. I wish to have the work done and I plan to post up a job but I need to know how to word it. Does anyone have experience with this? Can someone point me in the right direction?
View 3 Replies
View Related
Apr 3, 2009
I am developing a Firefox extension and after upgrading from jQuery v1.2.6 to v1.3.2 I found that including jQuery in the XUL-file will break other extensions that displays buttons on the toolbar, among those is Adblock Plus.
I have not tried any versions between those mentioned so I do not know in what version this happened. If i revert to v1.2.6 everything is OK.
View 6 Replies
View Related
May 15, 2010
I'm actually doing a firefox extension in which i would like to implement the jWebsocket API in order to build a small chat. I got my main script file, named test.js, and the jWebsocket lib into a js folder. Just for you to know, this is my first firefox extension ever. So in my XUL file I got this :
[Code]....
View 1 Replies
View Related
Nov 18, 2010
I have started to work on an extension that triggers when the page has been loaded. The problem I have is that the event is triggered twice. Its almost as if two threads are created when the users navigates or browses web sites. Why does this happen and how could this be changed to only trigger once. I have attached the files. Here is the browser.xul file
[Code]...
View 1 Replies
View Related
Jul 27, 2009
I'm trying to detect keystrokes using Javascript. My code (so far) works in Opera and Safari, but not in Firefox, Netscape/SeaMonkey/Mozilla, or Chrome. (I have no idea if it works in IE; IE has other problems with my code.)What I've done is attached a onkeydown listener to the body tag. (I've also tried it with onkeypress and onkeyup.) Right now all I'm trying to do is detect a key press -- any key press -- and throw an alert as a result. I've tried it two separate ways -- with straight Javascript and with MooTools, which I'm using for the rest of my project.
The code I have is as follows:
mootools version
$(document.getElementsByTagName('body')[0]).addEvent('keypress', function(event) { alert('key has been pressed.'); });
regular javascript version
document.getElementsByTagName('body')[0].addEventListener("keypress", function() { alert('key has been pressed.'); }, false);
Both versions work in Opera and Safari. Interestingly enough, if I attach a click listener to the body using the exact same code as above, but changing the word 'keypress' to 'click', they both work in Firefox as well. I can't figure out how to get this key listener attached.
View 7 Replies
View Related
May 30, 2009
I have seen plenty of online sources tell of how to write to an iframe, that it is a property of "window". But the problem is, the iframe in question is in a frame itself. How do I refer to such an iframe?
View 3 Replies
View Related
Mar 12, 2010
I have an input box and I want it to function so that when the user presses the enter/return key, it runs a js function. I have the following code:
input.onkeydown = function () {
if (event.keyCode === 13) {
// do something
}
}
This works in Safari, Opera, Chrome, and even IE, but not in firefox.
View 6 Replies
View Related
Jul 13, 2010
I am trying to write a bookmarklet that extract a citation information from a web page in a new text file for the client by using javascript.
but I could not find any solution where writing to a text file is allowed with firefox by using javascript.
the application suppose to be run on the client side only.
View 2 Replies
View Related
Apr 13, 2005
Firefox has a Javascript Console that has 3 panels besides "All" and "Clear": "Errors", "Warnings", "Message".
Does anyone know a way to log a message in the Message panel with JavaScript? That would really help debugging. I know there's a way involving XPCOM, but that only works with "trusted" scripts, and scripts loaded thru html aren't trusted.
View 1 Replies
View Related
Jul 23, 2005
Is there a way to detect if an textarea onscroll event is working in
Firefox (or Mozilla). I know that there is an onscroll event bubbling
bug with current vesions of these browsers so I want to detect this
problem with a test like "if (textarea.onscroll == 'undefined' ||
!textarea.onscroll) {}."
View 1 Replies
View Related
Jun 5, 2010
I've been working on a Google Chrome extension that reads the feed from URL... and it works perfectly. I published it already, but now I'm trying to create an options page to change the feed between TheOatmeal and TheOatmeal's Twitter feed. Eventually I'll add badges so people know when a new update occurs, but that's beside the point.The current problem I'm having now is an if this, do this statement, I believe. I really don't know all that much about Javascript, but once I get both feeds working correctly, I won't have to.My option.html and option.js files are both attached in the .zip.
Inside my manifest.json file has "popup": 'popup.html' which is TheOatmeal site's RSS feed. 'popup2.html' is only in the folder of the extension, but it contains the JS script for the Twitter RSS feed.As for research, yes, I have. I've been looking through w3school tutorials and searching around for example options pages. The current option page I have came from a tutorial that I chopped up and added my own stuff to.
View 3 Replies
View Related
Sep 21, 2011
I have written a chrome extension which will redirect to all hrefs for a given source urls in current tab.. But i don't know why all of a sudden it stops executing after reaching some page. I am attaching my code as attachment.
View 1 Replies
View Related
Nov 20, 2003
Write i have an array, "company" firstly how can i write this to a table, cells? ive been told very quickly. if a table cell has an ID like
<td>ID=firstcompany</td>
using something like
document.all.firstcompany.innerhtml
will be able to display the result somehow into the required cell.
CAN any one advise on how to do this?
and one more little question? HOW has my friend some how? protected his source from being seen online?
View 14 Replies
View Related
Apr 7, 2007
I'd like to be able to detect when page content is dynamically changed
by Javascript. I'd like to detect any changes to the content, such as
the addition of new DOM elements and when DOM elements that are hidden
are made visible (or vice versa). I will have no advance knowledge of
the scripts that will be run along with the script I will create.
I've implemented a solution that works reasonably well, but I'm not
sure if there are cases I'm not thinking of where it will fail, or if
there are more efficient means of doing the same thing.
My solution is to simply retrieve and periodically compare the content
of the innerHTML property of the main body tag elemnt.
So, summarized as follows:
function check() {
var bodyContent = document.getElementsByTagName('body')[0];
if(bodyContent != oldBodyContent) {
alert('body changed');
}
setTimeout(check, 500);
}
Is there a better way? What won't this catch?
View 1 Replies
View Related
Nov 8, 2005
Does anyone know if I can save part of a web page to a file on the users computer without saving the whole web page? I know I can print part of a web page using style sheets, will this work for saving also?
If not possible, can I use Javascript to program a button the end user can click to save data to a file on their computer?
View 2 Replies
View Related
Sep 3, 2006
I have a form that posts data to a PHP mailer page I have created. When
it goes to the PHP mailer page it reads some of the data and modifies
the page accordingly using Javascript (hiding certain divs, etc...). My
goal, is to take all this data after it has been processed by
Javascript and send it through my PHP mailer as it is currently
formatted.
If it helps any, the track I am on right now involves encapsulating the
Javascript processed block in a div. I am then trying to take the
..innerHTML data from that div and store it in the PHP $message variable
for my mailer. This won't work because PHP is server side. So, I moved
on to generate some Javascript code (with PHP) that sends all that
messy HTML data that its processed through a URL variable to then be
read by PHP. This doesn't really accomplish what I want as it cuts off
about a quarter of the way through my data......
Any ideas??
One thing I thought of but don't know how to do or whether it's even
possible is using PHP to view the source of the current page and store
that as the HTML to be e-mailed. Or, is it possible to do something
similar to .innerHTML with PHP?
View 3 Replies
View Related
Nov 15, 2010
How do I pass the email variable that the user enters to write to the thank you page? code...
View 1 Replies
View Related
Feb 10, 2011
I was wondering if there is a way to detect when a page has completely finished rendering? Is there an event in the JQuery library or JavaScript in general to detect when a page has completely rendered. I'd like to get some timing information for how long it takes for a page to render. I'd to do this offline to see how much CPU performance affects web page rendering.
View 3 Replies
View Related
Apr 8, 2011
I'd like to detect when the cursor leaves the page, and this doesn't work:$(document).mouseleave(aFunction); // Same with mouseout, too.
View 6 Replies
View Related
Oct 14, 2010
I'm having trouble detecting if there is value in a field when the page loads and manipulating the fields label class accordingly. Below is my code. I'm using it to display the field label inline with the field, and when the user starts typing, the label is hidden. The problem I'm having is, since this is for a login screen, if the user has typed in an incorrect password, the username still remains entered when the page reloads and I see my label stacked underneath.
How can I detect if that field has a value and apply a class to the label to hide it? I don't have to have to specify each field by their ID, because I'd like to use this all over (member profile management area).
[Code]...
View 7 Replies
View Related
Dec 16, 2011
I know this can be done with media-queries in CSS3, After attaching the jQuery library, I used js to get the width of the window browser-viewport) and store that in a variable.
What I was aiming to do was write a <title></title> for the page and attach a stylesheet through <link /> using js only when the window's height was greater than 596px. So, I wrote the following:
Code HTML4Strict:
<!Doctype HTML>
<html lang="en">
<head>
<script type="text/javascript" src="../assets/js/jquery-1.5.1.min.js"></script>
[Code]....
View 8 Replies
View Related
Jul 20, 2005
I have recently bought the book: JavaScript & DHTML Cookbook. As I
opened the .js files with note pad, I asked myself why was the code
formated in such a way. The code looks as if it had been produced by
some kind of programs instead of a person. I also noticed a lot of
little squared zeros; what are those all about?
I have also noticed code formated in a similar way, when viewing some
of the source code of the web pages on the MSN web site. If someone
knows anything about this machine-like formating, I would love to hear
from you.
View 3 Replies
View Related
Jun 3, 2009
I've been doing some research on url names. The problem is, I need this code to return like say "index.php", it would return "index". But idk where I went wrong..
The code:
<script>
var sPage;
var sPath = window.location.pathname;
//var sPage = sPath.substring(sPath.lastIndexOf('\') + 1);
[Code]...
View 28 Replies
View Related
May 5, 2011
How to run ajavascrpt prgram...i.e .js extension........
Is it to be run in dreamweaver...or any other simple way is there......or it is to be embedded in html code...and then run as .html extension...
View 1 Replies
View Related