본 사이트는 여러분의 사용자 경험을 개선하기 위해 유지 보수를 진행하는 동안 기능이 제한됩니다. 도움말로 문제가 해결되지 않고 질문을 하고 싶다면 Twitter의 @FirefoxSupport 및 Reddit의 /r/firefox 채널을 활용하세요.

Mozilla 도움말 검색

고객 지원 사기를 피하세요. 저희는 여러분께 절대로 전화를 걸거나 문자를 보내거나 개인 정보를 공유하도록 요청하지 않습니다. "악용 사례 신고"옵션을 사용하여 의심스러운 활동을 신고해 주세요.

자세히 살펴보기

How do I resize the Firefox window to a specific pixel width (from within Firefox)?

more options

I need to take screen captures at a specific width. How can I set the window width, say, to 1275 pixels? Height is not important. I'd like to be able to do this from within the Firefox window itself.

I need to take screen captures at a specific width. How can I set the window width, say, to 1275 pixels? Height is not important. I'd like to be able to do this from within the Firefox window itself.

선택된 해결법

  1. Open Scratchpad either by pressing Shift+F4 or clicking the Firefox button, opening the Web Developer submenu, then choosing Scratchpad.
  2. In the Scratchpad window, type window.resizeTo(1275,700);
  3. Press Ctrl+R or open the Execute menu and choose Run.
문맥에 따라 이 답변을 읽어주세요 👍 0

모든 댓글 (6)

more options

선택된 해결법

  1. Open Scratchpad either by pressing Shift+F4 or clicking the Firefox button, opening the Web Developer submenu, then choosing Scratchpad.
  2. In the Scratchpad window, type window.resizeTo(1275,700);
  3. Press Ctrl+R or open the Execute menu and choose Run.
more options

This will only work if there is an XUL (chrome) window like the about:newtab page is open and selected. Such pages have elevated permissions and allow scripts to change the window dimensions.

more options

Hi Gingerbread_Man, thanks for your response. I tried that and it didn't work. No effect. I have JavaScript enabled (in Tools, Options), and Allow scripts to resize popup windows is enabled. Combining your reply with cor-el's, I'm able to do it. Thanks!

글쓴이 shuttie27 수정일시

more options

Hi cor-el. Although I don't know what you mean by a XUL window, I tried the script on a new tab and it worked. So I guess it is a matter of permissions. I guess I could open a new tab, run the script, then switch back to the original tab. Thanks!

more options

It also works with the "Tools > Add-ons" page (about:addons), so that is an alternative if the new tab page is set to about:blank (like I prefer).

It doesn't matter if Tools > Options > Content : JavaScript > Advanced > Allow Scripts to: "Move or resize existing windows" is disabled.

more options

Alternatively, you can install an extension. For example, “Web Developer” allows you to resize the window from its toolbar. It works regardless of which page is open, and it's simpler than typing Javascript code in a separate window.