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

前端 未结 5 1398
轻奢々
轻奢々 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:23

    It still works, the URLs just look a bit different. Answered already over here, but the steps are:

    1. On the folder with your intended file (e.g. FILE.css), hit Sharing Settings, then Advanced, then select "Public on the web - Anyone on the Internet can find and view."
    2. In the URL bar (or share link), copy everything after the drive.google.com/drive/u/0/folders/
    3. Use that ID to replace the XX-XXXXXXXXXXXXX in: http://googledrive.com/host/XX-XXXXXXXXXXXXX/FILE.css
    4. Navigate to the appended URL in Step 3 and you will now see your raw data.

    Credit to @chris.huh at: https://productforums.google.com/forum/#!topic/drive/MyD7dgLJaEo

提交回复
热议问题