Skip to content

Instantly share code, notes, and snippets.

@ayalan
Last active February 22, 2016 09:50
Show Gist options
  • Save ayalan/d3ef9f2d0925f8ad51f5 to your computer and use it in GitHub Desktop.
Save ayalan/d3ef9f2d0925f8ad51f5 to your computer and use it in GitHub Desktop.
Detect LeoPalace or SUUMO and zap them accordingly. Join lines and add as bookmark.
jQuery(document).ready(function () {
if(window.location.href.indexOf("leopalace") > -1) {
alert("Detected Leopalace. ZAP!");
jQuery("#global, #header, #breadcrumb, #inquiry-form .points, .conTest5, .recommends-historys, .notices, #footCont, .outlines ul, #footer, .vacancys, h2.heading ul.print, .conTest5, .maps, #btnTop").fadeOut();
jQuery(".outlines ul").fadeOut();
jQuery(".outlines table, .outlines .clearFix").css("width", "100%");
jQuery("[class^='inquiries20']").fadeOut();
jQuery("body").css("background", "white");
jQuery("h2.heading").css("font-size", "2em");
jQuery("h2.heading").removeClass("heading");
jQuery("h2 .sprite").removeClass("sprite");
jQuery("form [class^='image20'] .photo, form [class^='image20'] .gaikan, form [class^='image20'] .madori").remove();
jQuery("form [class^='image20']>.inner").prepend(jQuery("form [class^='image20'] .photos"));
jQuery("form [class^='image20']>.inner").css({"clear":"both", "overflow":"auto"});
jQuery("form [class^='image20']>.inner>[class^='inner']").remove();
jQuery("form [class^='image20']>.inner>.photos").css({"float": "none", "width" : "100%"});
jQuery("form [class^='image20']>.inner>.photos .buttons, form [class^='image20']>.inner>.photos .note").remove();
jQuery("form [class^='image20']>.inner>.photos img").css({"max-height" : "none"});
jQuery("form [class^='image20']>.inner>.photos img").css({"max-width" : "50%"});
jQuery("form [class^='image20']>.inner>.photos").append(jQuery("form [class^='image20']>.inner>.photos img"));
jQuery("form [class^='image20']>.inner>.photos ul.thumblist").remove();
jQuery("form [class^='image20']>.inner>.photos img").css("float", "left");
}
else if(window.location.href.indexOf("suumo") > -1) {
alert("Detected SUUMO. ZAP!");
$(function(){
$(".headercontainer, .mylist, .l-contactbox-action, .list-type-changer, #contact_form, #siryouForm, .footer, #info_area, #wrapper #contents .toiawaseTitle, #wrapper #contents .toiawaseTitle + .inline_list").fadeOut();
$(".l-contactbox").eq(1).fadeOut();
$("#js-imageGallery-main li").fadeIn();
$("#wrapper").remove(); $("#wrapper").css("width", "100%");
$("form").remove();
$("#js-imageGallery-main li img").each(function(){
$(this).insertBefore("#js-imageGallery").css({"display":"inline-block","width":"30%","margin":"1%"});
});
$("#js-imageGallery").fadeOut();});
}
else{
alert("Didn't detect anything. Are you looking at SUUMO or Leo Palace?")
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment