Google Apps Script How to link to JS or CSS file on Google Drive

前端 未结 5 1479
轻奢々
轻奢々 2021-02-04 14:00

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

5条回答
  •  南旧
    南旧 (楼主)
    2021-02-04 14:03

    UPDATE: As of August 31, 2015 this technique has been deprecated by Google.

    Google recent made it possible host a file publicly on Google Drive:

    1. Create a folder in Google Drive
    2. Put any files you want to access publicly in the folder
    3. 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
    4. 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

提交回复
热议问题