@@ -43,8 +43,8 @@ function attrToFull(attr) {
43
43
44
44
function licenseUrl ( attr , mode ) {
45
45
// 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 ' : ''
48
48
if ( attr . BY === false ) {
49
49
return `https://creativecommons.org/publicdomain/zero/1.0${ linkRef } `
50
50
}
@@ -125,13 +125,14 @@ function generateHTML(attributionDetails, shortLicenseName) {
125
125
' xmlns:cc="http://creativecommons.org/ns#"' +
126
126
' class="license-text">'
127
127
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 } " />`
130
131
if ( shortLicenseName . includes ( 'CC0' ) ) {
131
132
shortLicenseName = 'CC CC0 1.0'
132
133
}
133
134
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 } " />`
135
136
) . join ( '' )
136
137
dataForHtmlGeneration . licenseIconsLink = `<a href="${ licenseUrl ( shortToAttr ( shortLicenseName ) ) } ">${ licenseIcons } </a>`
137
138
@@ -153,6 +154,7 @@ function generateHTML(attributionDetails, shortLicenseName) {
153
154
}
154
155
return dataForHtmlGeneration
155
156
}
157
+
156
158
export {
157
159
defaultAttributes , CC0Attributes , CCBYAttributes , shortToAttr , attrToShort ,
158
160
attrToFull , licenseUrl , licenseSlug , licenseIconsArr , generateHTML , updateVisibleEnabledStatus
0 commit comments