ardittristan / VTTInlineWebviewer

Allows you to have webpages open inside Foundry VTT
MIT License
7 stars 4 forks source link

Can't get macro script to work! Please help! #17

Closed DanielRonnstam closed 3 years ago

DanielRonnstam commented 3 years ago

Hi. Could you please explain better how I should use the Macro script? I can't get it to work but I can't code. What have I done wrong here?...

/**

DanielRonnstam commented 3 years ago

I want to display a section of a google spreadsheet in the inline window, to get rid of the menu and stuff in the upper and left corners. Is this possible? If so, what would the macro script for this be?

ardittristan commented 3 years ago

normal:

window.Ardittristan.InlineViewer.sendUrl("https://docs.google.com/spreadsheets/d/1zP9s5kt9CTpOm4qYrzT2LIblNfL28SxqCKlk7KmpBbQ/edit?usp=sharing", false, 1000, 1500, "Conflict Resolve..." );

with hidden header:

window.Ardittristan.InlineViewer.sendUrl("https://docs.google.com/spreadsheets/d/1zP9s5kt9CTpOm4qYrzT2LIblNfL28SxqCKlk7KmpBbQ/edit?usp=sharing", true, 1000, 1500, "Conflict Resolve...", "#docs-chrome {display: none;}");
ardittristan commented 3 years ago

strings should be enclosed with quotes, and the = signs suggest that that's the default value

DanielRonnstam commented 3 years ago

Thanks!! will check

DanielRonnstam commented 3 years ago

It opens, and looks nice, but I would want to only show the area in the red square in the image below. Is this possible?

image

ardittristan commented 3 years ago

best I can get is this:

window.Ardittristan.InlineViewer.sendUrl("https://docs.google.com/spreadsheets/d/1zP9s5kt9CTpOm4qYrzT2LIblNfL28SxqCKlk7KmpBbQ/edit?usp=sharing", true, 1000, 1500, "Conflict Resolve...", "#docs-chrome, div[role=navigation] {display: none;}");
DanielRonnstam commented 3 years ago

ok thanks!