Advertisement
Guest User

Untitled

a guest
Dec 5th, 2016
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let browser = new InAppBrowser('http://mywebsite.com/', '_blank', 'location=no, zoom=no');
  2.    
  3.     browser.on('loadstart').subscribe((e)=>{
  4.         console.log('Carregando nova página.');
  5.         SpinnerDialog.show(null, "Carregando a página...");
  6.     });
  7.     browser.on('loadstop').subscribe((e)=>{
  8.         console.log('Página carregada.');
  9.         SpinnerDialog.hide();
  10.         if(e.url.includes('mywebsite.com/Segmentado')){
  11.           console.log('Loja Segmentado. '+e.url);
  12.           browser.insertCss({
  13.             code: `
  14.             table.tabRodape {
  15.                 width: 100%;
  16.             }
  17.  
  18.             footer.rodape img {
  19.                 width: 100%;
  20.             }
  21.  
  22.             div#divBlackNovember img {
  23.                 width: 100%;
  24.             }
  25.             `
  26.           }).then((e)=>{ console.log('CSS adicionado.'); }).catch((e)=>{ console.log('Erro ao adicionar CSS. '+e); });
  27.         }
  28.     });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement