@@ -43,8 +43,8 @@ function attrToFull(attr) {
4343
4444function licenseUrl ( attr , mode ) {
4545 // Returns url to license from short license name with version number (eg. 'CC BY 4.0')
46- // mode: web/ print (?ref=ccchooser is added to the end of the link if mode is web)
47- const linkRef = mode === 'web' ? '/?ref=ccchooser ' : ''
46+ // mode: web/ print (?ref=chooser-v1 is added to the end of the link if mode is web)
47+ const linkRef = mode === 'web' ? '/?ref=chooser-v1 ' : ''
4848 if ( attr . BY === false ) {
4949 return `https://creativecommons.org/publicdomain/zero/1.0${ linkRef } `
5050 }
@@ -125,13 +125,14 @@ function generateHTML(attributionDetails, shortLicenseName) {
125125 ' xmlns:cc="http://creativecommons.org/ns#"' +
126126 ' class="license-text">'
127127 const iconStyle = 'style="height:22px!important;margin-left: 3px;vertical-align:text-bottom;"'
128- const baseAssetsPath = 'https://search.creativecommons.org/static/img'
129- let licenseIcons = `<img ${ iconStyle } src="${ baseAssetsPath } /cc_icon.svg" />`
128+ const baseAssetsPath = 'https://mirrors.creativecommons.org/presskit/icons'
129+ const linkRef = '?ref=chooser-v1'
130+ let licenseIcons = `<img ${ iconStyle } src="${ baseAssetsPath } /cc.svg/${ linkRef } " />`
130131 if ( shortLicenseName . includes ( 'CC0' ) ) {
131132 shortLicenseName = 'CC CC0 1.0'
132133 }
133134 licenseIcons += shortLicenseName . slice ( 3 , shortLicenseName . length - 4 ) . split ( '-' ) . map ( license =>
134- `<img ${ iconStyle } src="${ baseAssetsPath } /cc- ${ license . toLowerCase ( ) } _icon .svg" />`
135+ `<img ${ iconStyle } src="${ baseAssetsPath } /${ license . toLowerCase ( ) } .svg/ ${ linkRef } " />`
135136 ) . join ( '' )
136137 dataForHtmlGeneration . licenseIconsLink = `<a href="${ licenseUrl ( shortToAttr ( shortLicenseName ) ) } ">${ licenseIcons } </a>`
137138
@@ -153,6 +154,7 @@ function generateHTML(attributionDetails, shortLicenseName) {
153154 }
154155 return dataForHtmlGeneration
155156}
157+
156158export {
157159 defaultAttributes , CC0Attributes , CCBYAttributes , shortToAttr , attrToShort ,
158160 attrToFull , licenseUrl , licenseSlug , licenseIconsArr , generateHTML , updateVisibleEnabledStatus
0 commit comments