Google Apps脚本如何链接到Google云端硬盘上的JS或CSS文件 [英] Google Apps Script How to link to JS or CSS file on Google Drive
本文介绍了Google Apps脚本如何链接到Google云端硬盘上的JS或CSS文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我可以保留 Google云端硬盘上的文件夹上托管的 style.css 或 anyscript.js ,然后在脚本中加入链接在云端硬盘中的文件?如果是这样,怎么办?
Can I keep style.css or anyscript.js hosted on a folder on Google Drive and then include the script with a link to the file in Drive? If so.. how?
这里是指在Google协作平台上使用的GAS ...因此脚本不在 Google云端硬盘
And here I mean GAS for use on Google Sites... so the script is not located in Google Drive
推荐答案
更新:自2015年8月31日起,此技术已经 Google已弃用。
- 在Google云端硬盘中创建文件夹
- 放置任何您想要的文件在文件夹中公开访问
- 公开分享(需要为在网络上公开),并从链接到共享复制文件夹ID。例如,来自此链接的文件夹ID: https://docs.google.com/folder/d/0B5AR8ct5SZfSTDZTQjNNVXR4RWM/ edit ... is: 0B5AR8ct5SZfSTDZTQjNNVXR4RWM
- 每个文件的网址为 https://googledrive.com/host/ ,然后是文件夹ID,后跟文件名。例如:如果您在步骤#1的文件夹中保存了 style.css : https:// googledrive.com/host/0B5AR8ct5SZfSTDZTQjNNVXR4RWM/style.css
- Create a folder in Google Drive
- Put any files you want to access publicly in the folder
- Share it publicly (needs to be "Public on the web") and copy the folder ID from the "Link to Share". For example, the folder ID from this link: https://docs.google.com/folder/d/0B5AR8ct5SZfSTDZTQjNNVXR4RWM/edit ... is: 0B5AR8ct5SZfSTDZTQjNNVXR4RWM
- The URL for each file will be https://googledrive.com/host/ followed by the folder id followed by the filename. For example: if you saved style.css in the folder in step #1: https://googledrive.com/host/0B5AR8ct5SZfSTDZTQjNNVXR4RWM/style.css
这篇关于Google Apps脚本如何链接到Google云端硬盘上的JS或CSS文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文