File tree Expand file tree Collapse file tree 4 files changed +8
-4
lines changed Expand file tree Collapse file tree 4 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 824824 You can use the HTML code below to embed the current 3D model in your website.
825825 </p>
826826 <input id="embed-code" class="input" type="text" autocomplete="off" spellcheck="false" />
827+ <h4>Embed URL</h4>
828+ <input id="embed-url" class="input" type="text" autocomplete="off" spellcheck="false" />
827829 <div class="footer">
828830 <button class="btn close btn-primary">Close</button>
829831 </div>
Original file line number Diff line number Diff line change 3030parse_str ($ _SERVER ["QUERY_STRING " ]);
3131header ("Content-Type: text " );
3232
33- //allow embed.molview.org
34- if ($ _SERVER ["HTTP_ORIGIN " ] == "http://embed.molview.org " )
33+ //allow embed.molview.org and molview.org
34+ $ origin = $ _SERVER ["HTTP_ORIGIN " ];
35+ if ($ origin == 'http://molview.org ' || $ origin == 'https://embed.molview.org ' )
3536{
36- header ("Access-Control-Allow-Origin: " .$ _SERVER [ " HTTP_ORIGIN " ] );
37+ header ("Access-Control-Allow-Origin: " .$ origin );
3738}
3839
3940//connect to cod
Original file line number Diff line number Diff line change @@ -89,5 +89,6 @@ var Link = {
8989
9090 Link . embedHTML = '<iframe style="width: ' + $ ( "#embed-width" ) . val ( ) + '; height: ' + $ ( "#embed-height" ) . val ( ) + ';" frameborder="0" src="' + url + '"></iframe>' ;
9191 $ ( "#embed-code" ) . val ( Link . embedHTML ) ;
92+ $ ( "#embed-url" ) . val ( url ) ;
9293 }
9394} ;
Original file line number Diff line number Diff line change @@ -781,7 +781,7 @@ var Request = {
781781 AJAX ( {
782782 primary : true ,
783783 dataType : "text" ,
784- url : Request . API_ROOT + " api/cod/cif/" + codid + ".cif" ,
784+ url : "https://molview.org/ api/cod/cif/" + codid + ".cif" ,
785785 defaultError : error ,
786786 success : success
787787 } ) ;
You can’t perform that action at this time.
0 commit comments