rojer / a-s-minus

Awesome Screenshot Minus
102 stars 24 forks source link

Can only save visible area on some pages #37

Open charlieartist opened 7 years ago

charlieartist commented 7 years ago

Sometimes, when developing locally, I can only take a screenshot of the visible part of the page, other options (such as entire page) is grayed out. I'm experiencing this on pages that aren't that complex, and am trying to track down what causes this.

Is this a buffering/file size issue?

jkayani commented 7 years ago

The extension uses a RegExp to determine which pages can use the selected, entire, or delayed capture modes(popup.js:18). The RegExp only allowed URLs that look like this: /https?:\/\/*\/*/gi. Changing that to include local pages would look like this: /(https?|file):\/\/*\/*/gi. When I tried this, it worked fine on local pages, and I can't imagine why this wouldn't be a desired feature.

I'd wait for the maintainer (@rojer) to chime in, but it seems like a poorly written RegExp is the only thing in the way. Maybe you can try this temp. fix yourself, and let us know if you run into any oddities.

ZeevoX commented 7 years ago

FIxed in e55285a2d17395c53a969aab7700890279389699