.style({paddingLeft:'20px'})// restore CSS value in case the user saw a PDF before where we remove padding
.img({
src:resource.toString()+'?'+newDate().getTime()// We really want to avoid the browser from caching this resource, so we add a fake query param that is unique
src:resource.toString()+'?'+Date.now()// We really want to avoid the browser from caching this resource, so we add a fake query param that is unique
}).on(DOM.EventType.LOAD,()=>{
if(scrollbar){
scrollbar.scanDomNode();
...
...
@@ -106,7 +106,7 @@ export class ResourceViewer {
.style({padding:0,margin:0})// We really do not want any paddings or margins when displaying PDFs
.element('object')
.attr({
data:resource.toString()+'?'+newDate().getTime(),// We really want to avoid the browser from caching this resource, so we add a fake query param that is unique
data:resource.toString()+'?'+Date.now(),// We really want to avoid the browser from caching this resource, so we add a fake query param that is unique
width:'100%',
height:'100%',
type:mime
...
...
@@ -120,7 +120,7 @@ export class ResourceViewer {
.style({paddingLeft:'20px'})// restore CSS value in case the user saw a PDF before where we remove padding
.element('audio')
.attr({
src:resource.toString()+'?'+newDate().getTime(),// We really want to avoid the browser from caching this resource, so we add a fake query param that is unique
src:resource.toString()+'?'+Date.now(),// We really want to avoid the browser from caching this resource, so we add a fake query param that is unique
text:nls.localize('missingAudioSupport',"Sorry but playback of audio files is not supported."),
controls:'controls'
}).on(DOM.EventType.LOAD,()=>{
...
...
@@ -137,7 +137,7 @@ export class ResourceViewer {
.style({paddingLeft:'20px'})// restore CSS value in case the user saw a PDF before where we remove padding
.element('video')
.attr({
src:resource.toString()+'?'+newDate().getTime(),// We really want to avoid the browser from caching this resource, so we add a fake query param that is unique
src:resource.toString()+'?'+Date.now(),// We really want to avoid the browser from caching this resource, so we add a fake query param that is unique
text:nls.localize('missingVideoSupport',"Sorry but playback of video files is not supported."),