Skip to content

Commit

Permalink
1.5.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
bengrosser committed Aug 15, 2014
1 parent 39ae3d7 commit 6f35532
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 47 deletions.
@@ -1,6 +1,6 @@
// ==UserScript==
// @name Facebook Demetricator
// @version 1.5.0
// @version 1.5.1
// @namespace facebookdemetricator
// @description Removes all the metrics from Facebook

Expand Down Expand Up @@ -28,7 +28,7 @@
// Winner of a Terminal Award for 2012-13
// http://terminalapsu.org
//
// Version 1.5.0
// Version 1.5.1
// http://bengrosser.com/projects/facebook-demetricator/
//
// Major Exhibitions:
Expand Down Expand Up @@ -67,18 +67,18 @@ var currentMoreChatCount;
var currentLikeCount; // for tracking likes in the dialog
var currentTitleText; // current (non-metric) count of $('title')
var timelineView = false;
var searchBarWidth = "300px";
var searchBarWidth = "350px";
//var newSearchBarWidth = 530;
var newSearchBarWidth = 400;
var newSearchBarWidthNarrow = 400;
var newSearchBarWidth = 350;
var newSearchBarWidthNarrow = 350;


// constants
var FADE_SPEED = 175; // used in jQuery fadeIn()/fadeOut()
var ELEMENT_POLL_SPEED = 750; // waitForKeyElements polling interval
var RIBBON_TEXT_COLOR = "rgb(59,89,152)"; // TODO change this to opacity
var LINK_HIGHLIGHT_ON = false; // debugging
var VERSION_NUMBER = '1.5.0'; // used in the console logging
var VERSION_NUMBER = '1.5.1'; // used in the console logging
var KEY_CONTROL = false;
var FAN_PAGE_URL = 'http://bengrosser.com';
//var DEMETRICATOR_HOME_URL = 'http%3A%2F%2Fbengrosser.com/projects/facebook-demetricator/';
Expand Down Expand Up @@ -342,13 +342,16 @@ function toggleDemetricator() {


// search results pages are narrower than all other pages
/*
if(startURL.contains("/search/")) {
j('.-cx-PUBLIC-fbFacebar__root').css('width',newSearchBarWidthNarrow+"px");
j('._585-').css('width',newSearchBarWidthNarrow+"px");
} else {
j('.-cx-PUBLIC-fbFacebar__root').css('width',newSearchBarWidth+"px");
j('._585-').css('width',newSearchBarWidth+"px");
}
*/
j('._585-').css('width',newSearchBarWidth+"px");

}, 250);

Expand Down Expand Up @@ -392,12 +395,15 @@ function main() {
j = jQuery.noConflict();

// check for graph search
if(j('body.hasSmurfbar').length) {
HAS_GRAPH_SEARCH = true;
//console.log("Graph Search Detected");
demetricateGraphSearchSelectorOverview();
demetricateGraphSearchResults();
}
// aug 2014 -- everyone has graph search now (I think!!)
//if(j('body.hasSmurfbar').length) {

HAS_GRAPH_SEARCH = true;
//console.log("Graph Search Detected");
demetricateGraphSearchSelectorOverview();
demetricateGraphSearchResults();

//}



Expand Down Expand Up @@ -465,12 +471,18 @@ function main() {

var newnewnavbar = '<li class="navItem middleItem _55bi litestandNavItem _55bh"><img id="fbdtoggleindicator" class="loadingIndicator img" src="https://s-static.ak.facebook.com/rsrc.php/v2/yb/r/GsNJNwuI-UM.gif" alt="" width="16" height="11" style="display:none;margin:5px 5px 0 10px;"><a id="demetricatorlink" class="navLink bigPadding" style="padding-left:4px;"><label id="demetricatortogglelabel" style="padding:5px;"><input id="demetricatortoggle" type="checkbox" checked="checked" name="demetricatordb" style="margin-top:0px;margin-right:0px;line-height:29px;margin-left:0px;z-index:100;"></label>Demetricator</a></div></li>';

var navbaraug2014TEST = '<li class="_3zm- _55bi _2pdh"><img id="fbdtoggleindicator" class="loadingIndicator img" src="https://s-static.ak.facebook.com/rsrc.php/v2/yb/r/GsNJNwuI-UM.gif" alt="" width="16" height="11" style="display:none;margin:5px 5px 0 10px;"><a id="demetricatorlink" class="_1ayn" style="margin:4px 5px 0 0;"><label id="demetricatortogglelabel" style="padding:5px;"><input id="demetricatortoggle" type="checkbox" checked="checked" name="demetricatordb" style="margin-top:0px;margin-right:0px;line-height:29px;margin-left:0px;z-index:100;"></label>Demetricator</a></div></li>';

var navbaraug2014 = '<li class="_3zm- _55bi _2pdh"><img id="fbdtoggleindicator" class="loadingIndicator img" src="https://s-static.ak.facebook.com/rsrc.php/v2/yb/r/GsNJNwuI-UM.gif" alt="" width="16" height="11" style="display:none;margin:5px 5px 0 10px;"><a id="demetricatorlink" class="_1ayn" style="padding-left:5px;"><label id="demetricatortogglelabel" style="padding:5px;"><input id="demetricatortoggle" type="checkbox" checked="checked" name="demetricatordb" style="margin:0;z-index:100;"></label>Demetricator</a></div></li>';

// if we have graph search, insert the new nav item
if(HAS_GRAPH_SEARCH) {
//j('#navHome .navLink').css('padding-left','0px');
//`j('#navHome a').css('border-left','0px');
// LATEST Before 1.5 j('#navHome').prepend(GSdemetricatornavitem);
j('#navHome').before(newnewnavbar);
// old aug 2014
//j('#navHome').before(newnewnavbar);

//j('#navHome').before(GSdemetricatornavitem);
//j('#jewelsListItem').append(GSdemetricatornavitem);
// fixing for 3/20 FB update
Expand All @@ -479,24 +491,31 @@ function main() {

// fixing for 5/2013 FB update
// add a vertical right-hand border to the jewel buttons to demarcate from Demetricator toggle
j('#jewelsListItem').css('border-right','1px solid rgb(77, 104, 167)');
// old aug 2014
//j('#jewelsListItem').css('border-right','1px solid rgb(77, 104, 167)');

j('#navFacebar').css('width',searchBarWidth);
j('.fbFacebar').css('width',searchBarWidth);
// OLD NOW
//j('#navFacebar').css('width',searchBarWidth);
//j('.fbFacebar').css('width',searchBarWidth);
//

j('._585-').css('width',searchBarWidth);
navbar = j('#pagelet_bluebar ul li a[accesskey=1]').parent().parent().not('.fbd_modified');
navbar.addClass('fbd_modified');
navbar.prepend(navbaraug2014);
namelink = j('._4fn6');
namelink.addClass('_55bh');
namelink.css("padding","0px 8px 0px 8px");


/*
* adjusted search bar width to work for findFriends by default
if(j('#findFriendsNav').length) {
newSearchBarWidth -= 100;
newSearchBarWidthNarrow -= 100;
}
*/

// search results pages are narrower than all other pages
if(startURL.contains("/search/")) {
j('.-cx-PUBLIC-fbFacebar__root').css('width',newSearchBarWidthNarrow+"px");
j('._585-').css('width',newSearchBarWidthNarrow+"px");
} else {
j('.-cx-PUBLIC-fbFacebar__root').css('width',newSearchBarWidth+"px");
j('._585-').css('width',newSearchBarWidth+"px");
}

} else {
// insert the navigation control
Expand Down Expand Up @@ -551,16 +570,20 @@ function main() {
//j('#navFacebar').css('width','560px');
//j('.fbFacebar').css('width','530px');
// 5/2013 update
j('#navFacebar').css('width',searchBarWidth);
j('.fbFacebar').css('width',searchBarWidth);
// old aug 2014
//j('#navFacebar').css('width',searchBarWidth);
//j('.fbFacebar').css('width',searchBarWidth);
//
// old aug 2014

if(startURL.contains("/search/")) {
j('.-cx-PUBLIC-fbFacebar__root').css('width',newSearchBarWidthNarrow-40+"px");
j('._585-').css('width',newSearchBarWidthNarrow-40+"px");
} else {
j('.-cx-PUBLIC-fbFacebar__root').css('width',newSearchBarWidth-40+"px");
j('._585-').css('width',newSearchBarWidth-40+"px");
}
//if(startURL.contains("/search/")) {
// //j('.-cx-PUBLIC-fbFacebar__root').css('width',newSearchBarWidthNarrow-40+"px");
// j('._585-').css('width',newSearchBarWidthNarrow-40+"px");
//} else {
// //j('.-cx-PUBLIC-fbFacebar__root').css('width',newSearchBarWidth-40+"px");
// j('._585-').css('width',newSearchBarWidth-40+"px");
//}
j('._585-').css('width',newSearchBarWidth-40+"px");

j('#fbdtoggleindicator').show();

Expand Down Expand Up @@ -1615,10 +1638,15 @@ function demetricateNewTimeline() {


// friend requests block count (red/white) - new timeline
// old aug 2014
j('.-cx-PRIVATE-uiCountButtonCount__root').not('.facebookcount').each(function() {
j(this).addClass('facebookcount facebookmetric_opacity').css('opacity','0');
});

j('#pagelet_timeline_medley_friends span a span').not('.facebookcount').each(function() {
j(this).addClass('facebookcount facebookmetric_opacity').css('opacity','0');
});


// album page individual albums photo counts (facebook.com/username/photos)
j('.photoText .fsm.fwn.fcg').not('.facebookcount').addClass('facebookcount').css('opacity','0');
Expand Down Expand Up @@ -2956,17 +2984,24 @@ function demetricatePhotoIndex() {

// but only lasted a week until it became a complete clusterfuck of obfuscation ...
// i don't think this will last, so I'm leaving above in just in case
j('._53n,._53m').not('.facebookcount').each(function() {
// OLD aug 2014
//j('._53n,._53m').not('.facebookcount').each(function() {
// j(this).html('<span style="opacity:0" class="facebookmetric_opacity">'+
// j(this).text() + '</span>');
//});

j('._5gm1,._5gl_').not('.facebookcount').each(function() {
j(this).html('<span style="opacity:0" class="facebookmetric_opacity">'+
j(this).text() + '</span>');
});

// new timeline update 5/2013
j('.-cx-PRIVATE-fbInlineActions__likes, .-cx-PRIVATE-fbInlineActions__comments').
not('.facebookcount').each(function() {
j(this).html('<span style="opacity:0" class="facebookmetric_opacity">'+
j(this).text() + '</span>');
});
// old aug 2014
//j('.-cx-PRIVATE-fbInlineActions__likes, .-cx-PRIVATE-fbInlineActions__comments').
// not('.facebookcount').each(function() {
// j(this).html('<span style="opacity:0" class="facebookmetric_opacity">'+
// j(this).text() + '</span>');
//});

}

Expand Down Expand Up @@ -3812,13 +3847,14 @@ function checkForNewPage() {
startURL = curURL;

// search results pages are narrower than all other pages
if(startURL.contains("/search/")) {
j('.-cx-PUBLIC-fbFacebar__root').css('width',newSearchBarWidthNarrow+"px");
j('._585-').css('width',newSearchBarWidthNarrow+"px");
} else {
j('.-cx-PUBLIC-fbFacebar__root').css('width',newSearchBarWidth+"px");
j('._585-').css('width',newSearchBarWidth+"px");
}
// old aug 2014
// if(startURL.contains("/search/")) {
// j('.-cx-PUBLIC-fbFacebar__root').css('width',newSearchBarWidthNarrow+"px");
// j('._585-').css('width',newSearchBarWidthNarrow+"px");
// } else {
// j('.-cx-PUBLIC-fbFacebar__root').css('width',newSearchBarWidth+"px");
// j('._585-').css('width',newSearchBarWidth+"px");
// }

}

Expand Down
@@ -1,6 +1,6 @@
{
"name": "Facebook Demetricator",
"version": "1.5.0",
"version": "1.5.1",
"description": "Hides all the metrics on Facebook",
"homepage_url": "http://bengrosser.com/projects/facebook-demetricator/",
"manifest_version": 2,
Expand Down

0 comments on commit 6f35532

Please sign in to comment.