MediaWiki:Mobile.js: Difference between revisions

No edit summary
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 20: Line 20:




// HIDING ELEMENTS
// ########################


if(
if(
Line 25: Line 27:
)
)
{
{
var plusLinks = document.querySelectorAll('.pre-content');
var firstLink = plusLinks[0];
firstLink.setAttribute('class', 'hidethis');
}


// ########################


if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){
if(
  // true for mobile device
window.location.href=="https://www.exagear.wiki/index.php?title=Main_Page(ru)&mobileaction=toggle_view_mobile"  
  var x = document.getElementById("page-actions");
)
  x.style.display = "none";
{var plusLinks = document.querySelectorAll('.pre-content');
 
var firstLink = plusLinks[0];
  var y = document.getElementById("heading-holder");
firstLink.setAttribute('class', 'hidethis');
  y.style.display = "none";
}
 
  var z = document.getElementById("pre-content ");
  z.style.display = "none";
 
 
 


// ########################
if(
window.location.href=="https://www.exagear.wiki/index.php?title=Main_Page&mobileaction=toggle_view_mobile"
)
{
var plusLinks = document.querySelectorAll('.pre-content');
var firstLink = plusLinks[0];
firstLink.setAttribute('class', 'hidethis');
}
}
}
// ########################
 




Line 49: Line 57:
window.location.href=="https://www.exagear.wiki/index.php?title=Main_Page(ru)"  
window.location.href=="https://www.exagear.wiki/index.php?title=Main_Page(ru)"  
)
)
{
{var plusLinks = document.querySelectorAll('.pre-content');
 
var firstLink = plusLinks[0];
 
firstLink.setAttribute('class', 'hidethis');
if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){
  // true for mobile device
  var x = document.getElementById("page-actions");
  x.style.display = "none";
 
 
  var y = document.getElementById("heading-holder");
  y.style.display = "none";
 
  var z = document.getElementById("pre-content ");
  z.style.display = "none";
 
}
}
}