@register.simple_tag
def crossorigin():
 if absolute_uri(settings.STATIC_URL).startswith(options.get('system.url-prefix')):
  return ''
 return ' crossorigin="anonymous"'

@ register . simple_tag def crossorigin ( ) : if absolute_uri ( settings . STATIC_URL ) . startswith ( options . get ( 'system.url-prefix' ) ) : return '' return ' crossorigin="anonymous"'
returns an additional crossorigin="anonymous" snippet for use in a <script> tag if our asset urls are from a different domain than the system .