!function(a){a.fn.prognroll=function(b){var c=a.extend({height:5,color:"#50bcb6",position:"top",custom:!1},b);return this.each(function(){if(a(this).data("prognroll"))return!1;a(this).data("prognroll",!0);var b=a("<span>",{class:"bar"});a("body").prepend(b),b.css({position:"fixed",bottom:null,left:0,width:0,height:c.height,backgroundColor:c.color,zIndex:9999999}),"top"===c.position?b.css("top",0):b.css("bottom",0),c.custom===!1?a(window).scroll(function(b){b.preventDefault();var c=a(window).scrollTop(),d=a(window).outerHeight(),e=a("body").outerHeight(),f=c/(e-d)*100;a(".bar").css("width",f+"%")}):a(this).scroll(function(b){b.preventDefault();var c=a(this).scrollTop(),d=a(this).outerHeight(),e=a(this).prop("scrollHeight"),f=c/(e-d)*100;a(".bar").css("width",f+"%")}),a(window).on("hashchange",function(b){b.preventDefault(),console.log(a(window).scrollTop())}),a(window).trigger("hashchange");var d=a(window).scrollTop(),e=a(window).outerHeight(),f=a("body").outerHeight(),g=d/(f-e)*100;a(".bar").css("width",g+"%")})}}(jQuery);
!function(a){a.fn.prognroll=function(b){var c=a.extend({height:5,color:"#50bcb6",position:"top",custom:!1},b);return this.each(function(){if(a(this).data("prognroll"))return!1;a(this).data("prognroll",!0);var b=a("<span>",{class:"bar"});a("body").prepend(b),b.css({position:"fixed",left:0,width:0,height:c.height,backgroundColor:c.color,zIndex:9999999}),"top"===c.position?b.css("top",0):b.css("bottom",0),c.custom===!1?a(window).scroll(function(b){b.preventDefault();var c=a(window).scrollTop(),d=a(window).outerHeight(),e=a("body").outerHeight(),f=c/(e-d)*100;a(".bar").css("width",f+"%")}):a(this).scroll(function(b){b.preventDefault();var c=a(this).scrollTop(),d=a(this).outerHeight(),e=a(this).prop("scrollHeight"),f=c/(e-d)*100;a(".bar").css("width",f+"%")}),a(window).on("hashchange",function(b){b.preventDefault(),console.log(a(window).scrollTop())}),a(window).trigger("hashchange");var d=a(window).scrollTop(),e=a(window).outerHeight(),f=a("body").outerHeight(),g=d/(f-e)*100;a(".bar").css("width",g+"%")})}}(jQuery);

Remove unnecessary css property