browser-extension

Simulating a remote website locally for testing

╄→尐↘猪︶ㄣ 提交于 2019-12-03 12:38:44
问题 I am developing a browser extension. The extension works on external websites we have no control over. I would like to be able to test the extension. One of the major problems I'm facing is displaying a website 'as-is' locally. Is it possible to display a website 'as-is' locally? I want to be able to serve the website exactly as-is locally for testing. This means I want to simulate the exact same HTTP data, including iframe ads, etc. Is there an easy way to do this? More info: I'd like my

Javascript code to detect any page changes? (maybe via AJAX)

纵然是瞬间 提交于 2019-12-03 09:10:10
Ok so I'm new to writing javascript, and here's what I'm doing/trying to do. When a page loads (window.onload) my javascript code goes through all the forms in a page and attaches a certain "onchange" method to them. This works fine for most websites on the internet, except when a page dynamically updates to load more forms on the page. How do I detect such an event and re-run my function? For example: The Facebook Newsfeed has a bunch of forms associated with all the different statuses/links posted. My code goes through them and attaches the listener. But if go you all the way down the page

Developing Internet Explorer, browser helper object extensions?

你说的曾经没有我的故事 提交于 2019-12-03 07:33:43
1) I am trying to make a simple BHO in C# like here already answered: https://stackoverflow.com/a/5740004/285594 2) But unfortunately they all tried less then IE11, where some made it work and some failed too 3) after following everything as mentioned in that answer, i also purchased official code sign but it simply does not working in IE11 Windows 7 64-bit. You can download my prepared version of Visual studio 2013: which includes all the source code and details for IE11: https://www.dropbox.com/s/60kg212vkjb7yud/ClassLibrary2.rar Q. Can anyone please advise/suggest/help how can i make one

What might be shufflling my query string parameters constructed in JavaScript?

不想你离开。 提交于 2019-12-03 07:13:49
问题 So this might be a long, long shot, yet I am completely stumped on what might be causing this issue: I am delivering a client side JavaScript, that parses certain parameters on the page where it is embedded, uses these parameters to construct a URL and inject an iframe using that URL into the page like: var queryParams = { param: 'foo' , other: 'bar' }; is turned into: <iframe src="http://example.net/iframes/123?param=foo&other=bar"></iframe> This is working quite fine, I am delivering around

How to develop custom filters for the Imagus hover zoom extension?

倖福魔咒の 提交于 2019-12-03 05:11:29
问题 After I read about Hover Zoom being evil (yikes!), two articles made me instantly switch to another one, called Imagus: Hoverzoom’s Malware controversy, and Imagus alternative - ghacks.net Imagus is a Hover Zoom Replacement to Enlarge Images on Mouseover - LifeHacker Imagus seems to fit the bill by doing pretty much what Hover Zoom also could, but in addition, it seems to support custom filters (to support more sites), in addition to the huge bunch it already comes packed with. In the options

Chrome extension: Execute background page only once when chrome starts

南楼画角 提交于 2019-12-03 04:03:26
I am playing with chrome extensions, my manifest loads a background page with: ... "background": { "scripts": ["background_page.js"], "persistent": false }, ... The .js code looks like this: var once = false; window.addEventListener("load", function () { if ( once == true ) { return; } alert( 'test' ); once = true; }, false); This seems to works fine, but i want to run the background_page.js code only once every time the browser starts. Right now, I am not sure why, but the code is executed more than once. At first I thought it was being executed every time I open a new tab but that's not the

Secure OAuth in Javascript

流过昼夜 提交于 2019-12-03 03:11:58
问题 I have an api which uses OAuth 1.0a to authenticate applications using it. It's replacing an old api which used a number of custom built and hodge-podge calls which are being deprecated. It's well known that OAuth 1.0a is not secure in (client-side) Javascript since it relies on the consumer secret being kept secret. Which is not possible since the source is always viewable. We have browser extensions for Chrome, Firefox, IE and Safari which need to use this api in the future. These

Simulating a remote website locally for testing

心已入冬 提交于 2019-12-03 02:59:47
I am developing a browser extension. The extension works on external websites we have no control over. I would like to be able to test the extension. One of the major problems I'm facing is displaying a website 'as-is' locally. Is it possible to display a website 'as-is' locally? I want to be able to serve the website exactly as-is locally for testing. This means I want to simulate the exact same HTTP data, including iframe ads, etc. Is there an easy way to do this? More info: I'd like my system to act as closely to the remote website as possible. I'd like to run command fetch for example

What might be shufflling my query string parameters constructed in JavaScript?

梦想的初衷 提交于 2019-12-02 21:58:12
So this might be a long, long shot, yet I am completely stumped on what might be causing this issue: I am delivering a client side JavaScript, that parses certain parameters on the page where it is embedded, uses these parameters to construct a URL and inject an iframe using that URL into the page like: var queryParams = { param: 'foo' , other: 'bar' }; is turned into: <iframe src="http://example.net/iframes/123?param=foo&other=bar"></iframe> This is working quite fine, I am delivering around 1.5 million requests per day. Yet I recently noticed that in around 3.000 cases per day the values of

How to develop custom filters for the Imagus hover zoom extension?

一曲冷凌霜 提交于 2019-12-02 18:28:12
After I read about Hover Zoom being evil (yikes!), two articles made me instantly switch to another one, called Imagus: Hoverzoom’s Malware controversy, and Imagus alternative - ghacks.net Imagus is a Hover Zoom Replacement to Enlarge Images on Mouseover - LifeHacker Imagus seems to fit the bill by doing pretty much what Hover Zoom also could, but in addition, it seems to support custom filters (to support more sites), in addition to the huge bunch it already comes packed with. In the options page, on Chrome, the filters section looks deliciously hackable : However, at the same time, it seems