Merge pull request #2739 from dpalou/MOBILE-3704
MOBILE-3704 mod: Fix files with parameters in book & pagemain
commit
8c0a468d85
|
@ -971,7 +971,9 @@ export class CoreDomUtilsProvider {
|
||||||
const media = Array.from(element.querySelectorAll('img, video, audio, source, track'));
|
const media = Array.from(element.querySelectorAll('img, video, audio, source, track'));
|
||||||
media.forEach((media: HTMLElement) => {
|
media.forEach((media: HTMLElement) => {
|
||||||
const currentSrc = media.getAttribute('src');
|
const currentSrc = media.getAttribute('src');
|
||||||
const newSrc = currentSrc ? paths[CoreTextUtils.decodeURIComponent(currentSrc)] : undefined;
|
const newSrc = currentSrc ?
|
||||||
|
paths[CoreUrlUtils.removeUrlParams(CoreTextUtils.decodeURIComponent(currentSrc))] :
|
||||||
|
undefined;
|
||||||
|
|
||||||
if (typeof newSrc != 'undefined') {
|
if (typeof newSrc != 'undefined') {
|
||||||
media.setAttribute('src', newSrc);
|
media.setAttribute('src', newSrc);
|
||||||
|
@ -991,7 +993,9 @@ export class CoreDomUtilsProvider {
|
||||||
const anchors = Array.from(element.querySelectorAll('a'));
|
const anchors = Array.from(element.querySelectorAll('a'));
|
||||||
anchors.forEach((anchor: HTMLElement) => {
|
anchors.forEach((anchor: HTMLElement) => {
|
||||||
const currentHref = anchor.getAttribute('href');
|
const currentHref = anchor.getAttribute('href');
|
||||||
const newHref = currentHref ? paths[CoreTextUtils.decodeURIComponent(currentHref)] : undefined;
|
const newHref = currentHref ?
|
||||||
|
paths[CoreUrlUtils.removeUrlParams(CoreTextUtils.decodeURIComponent(currentHref))] :
|
||||||
|
undefined;
|
||||||
|
|
||||||
if (typeof newHref != 'undefined') {
|
if (typeof newHref != 'undefined') {
|
||||||
anchor.setAttribute('href', newHref);
|
anchor.setAttribute('href', newHref);
|
||||||
|
|
|
@ -514,3 +514,15 @@ ion-back-button.md::part(text) {
|
||||||
cursor: auto;
|
cursor: auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.core-media-adapt-width {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
img.core-media-adapt-width {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
audio.core-media-adapt-width {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue