<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Cannot load javascript from Dropbox - Incorrect Mime Type? in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Cannot-load-javascript-from-Dropbox-Incorrect-Mime-Type/m-p/385770#M21440</link>
    <description>&lt;P&gt;Based on the error message you shared, you're not getting exactly the same issue as the thread you linked to. It looks like you can still make this work using the modification mentioned there though, i.e., by changing your link to use 'dl.dropboxusercontent.com' initially, like this:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://dl.dropboxusercontent.com/s/5cbb5dki3rnpdei/DebugSimple.js" target="_blank"&gt;https://dl.dropboxusercontent.com/s/5cbb5dki3rnpdei/DebugSimple.js&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Note that this isn't officially supported though, and is subject to change.&lt;/P&gt;</description>
    <pubDate>Mon, 23 Dec 2019 16:41:36 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2019-12-23T16:41:36Z</dc:date>
    <item>
      <title>Cannot load javascript from Dropbox - Incorrect Mime Type?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Cannot-load-javascript-from-Dropbox-Incorrect-Mime-Type/m-p/385728#M21436</link>
      <description>&lt;P&gt;I am trying to load javascript code from Dropbox for use in personal bookmarklets. For instance,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(function(){
    const url = 'https://www.dropbox.com/s/5cbb5dki3rnpdei/DebugSimple.js?raw=1';
    const e = document.createElement('SCRIPT');
    e.src=url;
    document.head.appendChild(e);
})();&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, when doing so I get the error message&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Cross-Origin Read Blocking (CORB) blocked cross-origin response &lt;BR /&gt;https://&amp;lt;SOME_ID&amp;gt;.dl.dropboxusercontent.com/cd/0/inline/&amp;lt;SOME_LONG_ID&amp;gt;/file &lt;BR /&gt;with MIME type text/plain. See &lt;BR /&gt;https://www.chromestatus.com/feature/5629709824032768 for more details.&lt;/PRE&gt;
&lt;P&gt;Likewise, if I use the ?dl=0 or ?dl=1 settings instead of ?raw=1, I get a complaint about the type being text/html.&lt;/P&gt;
&lt;P&gt;I also tried using the fetch() API, but since the bookmarklets are executed in the context of third-party websites, their CORS header usually doesn't allow this.&lt;/P&gt;
&lt;P&gt;Is it somehow possible to load javascript from Dropbox directly?&lt;/P&gt;
&lt;P&gt;A similar question&amp;nbsp;&lt;A href="https://www.dropboxforum.com/t5/API-Support-Feedback/MIME-type-text-plain-is-not-executable/m-p/271231" target="_blank" rel="noopener"&gt;https://www.dropboxforum.com/t5/API-Support-Feedback/MIME-type-text-plain-is-not-executable/m-p/271231&lt;/A&gt;&amp;nbsp;has been marked as answered, but doesn't apply; I already have the correct file extension, and the issue still occurs.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Dec 2019 19:48:48 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Cannot-load-javascript-from-Dropbox-Incorrect-Mime-Type/m-p/385728#M21436</guid>
      <dc:creator>KlausB</dc:creator>
      <dc:date>2019-12-26T19:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot load javascript from Dropbox - Incorrect Mime Type?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Cannot-load-javascript-from-Dropbox-Incorrect-Mime-Type/m-p/385770#M21440</link>
      <description>&lt;P&gt;Based on the error message you shared, you're not getting exactly the same issue as the thread you linked to. It looks like you can still make this work using the modification mentioned there though, i.e., by changing your link to use 'dl.dropboxusercontent.com' initially, like this:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://dl.dropboxusercontent.com/s/5cbb5dki3rnpdei/DebugSimple.js" target="_blank"&gt;https://dl.dropboxusercontent.com/s/5cbb5dki3rnpdei/DebugSimple.js&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Note that this isn't officially supported though, and is subject to change.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Dec 2019 16:41:36 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Cannot-load-javascript-from-Dropbox-Incorrect-Mime-Type/m-p/385770#M21440</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2019-12-23T16:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot load javascript from Dropbox - Incorrect Mime Type?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Cannot-load-javascript-from-Dropbox-Incorrect-Mime-Type/m-p/385772#M21441</link>
      <description>&lt;P&gt;It does work indeed, but the lack of official support is discouraging. The following thus works:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(function(){
    const url = 'https://dl.dropboxusercontent.com/s/5cbb5dki3rnpdei/DebugSimple.js?raw=1';
    const e = document.createElement('SCRIPT');
    e.src=url;
    document.head.appendChild(e);
})();&lt;/PRE&gt;</description>
      <pubDate>Mon, 23 Dec 2019 16:52:25 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Cannot-load-javascript-from-Dropbox-Incorrect-Mime-Type/m-p/385772#M21441</guid>
      <dc:creator>KlausB</dc:creator>
      <dc:date>2019-12-23T16:52:25Z</dc:date>
    </item>
  </channel>
</rss>

