Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Montezuma Theme (http://forum.bytesforall.com/forumdisplay.php?f=53)
-   -   Post excerpt images are overlapping text with Chrome Extension (http://forum.bytesforall.com/showthread.php?t=21231)

apestate Dec 7, 2013 04:45 PM

Post excerpt images are overlapping text with Chrome Extension
 
I ran into an issue with post excerpt thumbs being displayed atop the excerpt contents when I showed my in-development website to a friend. Here is the way the page was rendered.

I couldn't repeat the problem so I searched this forum and found this thread where OP says the problem was an extension. With this information in hand, it was possible to isolate the issue to the Chrome extension Facebook Disconnect.

It is unclear how this plugin is affecting the page in question, but disabling the plugin resolves the problem, enabling the plugin causes it.

The following is the code of that plugin:
Code:

/*
  A content script that stops Facebook from tracking the webpages you go to.

  Copyright 2010, 2011 Disconnect, Inc.

  This program is free software: you can redistribute it and/or modify it under
  the terms of the GNU General Public License as published by the Free Software
  Foundation, either version 3 of the License, or (at your option) any later
  version.

  This program is distributed in the hope that it will be useful, but WITHOUT
  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

  You should have received a copy of the GNU General Public License along with
  this program. If not, see <http://www.gnu.org/licenses/>.

  Authors (one per line):

    Brian Kennish <byoogle@gmail.com>
*/

/* The domain names Facebook phones home with, lowercased. */
const DOMAINS = ['facebook.com', 'facebook.net', 'fbcdn.net', 'disconnect.me'];
    // "disconnect.me" whitelisting is temporary, for FBME.

/*
  Determines whether any of a bucket of domains is part of a URL, regex free.
*/
function isMatching(url, domains) {
  const DOMAIN_COUNT = domains.length;
  for (var i = 0; i < DOMAIN_COUNT; i++)
      if (url.toLowerCase().indexOf(domains[i], 2) >= 2) return true;
          // A valid URL has at least two characters ("//"), then the domain.
}

/* Traps and selectively cancels a request. */
if (!isMatching(location.href, DOMAINS))
    document.addEventListener('beforeload', function(event) {
      if (isMatching(event.url, DOMAINS)) event.preventDefault();
    }, true);



All times are GMT -6. The time now is 05:19 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.