If a spreadsheet were embedded as normal, would it work fine, then?
to give the user the option to embed spreadsheets that are otherwise just links, yes, no problem
And, so what you're saying is that there would need to be a server carrying an API key for each embedded object (or each source spreadsheet)? Just trying to clarify.
Would an API key still need to be required if it just operated with an IMPORTRANGE kind of function?
to use the API, you must have an API key. you only need one, though. the purpose is just to uniquely identify you as a user of the API. either every user of the script could obtain their own key and paste it into the script, or the creator of the script could have their own webserver running its own API that doesn't require a key from clients, which has its own google API key. you don't want to make your API key public, because then anyone could do anything with it and as far as google's concerned you're responsible
Also I am aware that those without the plugin would not see the results of the embedding, but that's when you A) hope that the extension is disseminated, and B) as the poster, post the link with the embedded element so users can see it.
maybe someone else doesn't care, but I'm not gonna make a userscript that inconveniences people without it or looks like gibberish to them. nobody should have to use a userscript to be able to make sense of a forum post. maybe they're on their phone or they like a browser that doesn't have a userscript extension, I dunno
no matter how popular the userscript is, the majority will always be those without it
Also, how difficult is it to retain the format of the sheet?
it should look exactly the same embedded as it does on the google docs website
anyway, I think there's a better solution than pseudo-BBC. just have the normal docs links, with the option to embed them like the youtube script. the spreadsheet key is obviously already in the link, so that's out of the way. for the other stuff, like custom height or width, or maybe ranges, you could have extra URL parameters, which the docs website would ignore so the links still behave normally for people without the script
so like...
https://drive.google.com/open?id=1EQmyG_-GoDZKGe3-DarNFMuU4lhgjaNn7_PUiJJW04A&h=500&w=750for a height of 500 and width of 750 (pixels? I guess?). maybe one that disables embedding too if you specifically wanted to avoid that
I dunno. this is quickly getting out of hand