Category: Web

Collection of Firefox add-ons

Finally got around to making a collection of all the Firefox add-ons I use. The collection has been refined over the past 10 years or so and everything in this collection is compatible with Multiprocess (e10s).

https://addons.mozilla.org/en-US/firefox/collections/anonymous-51818734302cbd93c93ec183ba49fd59/e10s-compatible-toolkit-2017/

These addons are part of the reason I still prefer using Firefox. Privacy concerns aside, Chrome just isn’t that customizable – Chrome add-ons just aren’t as useful in my everyday browsing.

Simple PHP script to display user’s IP address

< ?php
// Stolen from: http://www.cyberciti.biz/faq/php-howto-read-ip-address-of-remote-computerbrowser/
// and http://roshanbh.com.np/2007/12/getting-real-ip-address-in-php.html
// with CSS from http://www.w3schools.com/css/css_examples.asp
 
function getRealIpAddr()
{
    if (!empty($_SERVER['HTTP_CLIENT_IP']))   //check ip from share internet
    {
      $ip=$_SERVER['HTTP_CLIENT_IP'];
    }
    elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))   //to check ip is pass from proxy
    {
      $ip=$_SERVER['HTTP_X_FORWARDED_FOR'];
    }
    else
    {
      $ip=$_SERVER['REMOTE_ADDR'];
    }
    return $ip;
}
 
$adresseip = getRealIpAddr();
?>
<html><head>
<title>Adresse IP: < ?php echo $adresseip; ?></title>
<style type="text/css">
div { font-family:"Segoe UI","Lucida Grande","Calibri","Tahoma","Sans"; }
div.ip { font-size:250%; }
div.desc { font-size:200%; }
</style>
</head>
<body>
<div><img src="csdccs-blanc.png" alt="logo CSDCCS" /></div>
<p><div>Votre adresse IP: </div>
<div>< ?php echo $adresseip;?></div>
</p>   
</body>
</html>

CNet Download.com hosting adware/malware

I had noticed this a little while ago, but it seems they’re stepping it up.

Seriously, does CBS have no better revenue generation method than to install crapware on people’s computers?

See for example Pidgin Portable: http://download.cnet.com/Pidgin-Portable/3000-2150_4-10834880.html?tag=mncol;3

and this post on UltraVNC forums

https://forum.ultravnc.net/viewtopic.php?f=6&t=28692

Modified photo.html.php for widewind gallery3 theme

This enables dynamic resizing of the photo displayed, and enables the pseudo-lightbox popup to view the “full” resized image for users that can’t view the true full image.

< ?php defined("SYSPATH") or die("No direct script access.") ?>
 
<!-- Use javascript to show the full size as an overlay on the current page -->
<script type="text/javascript">
  $(document).ready(function() {
    full_dims = [< ?= $theme->item()->width ?>, < ?= $theme->item()->height ?>];
    $(".g-fullsize-link").click(function() {
      $.gallery_show_full_size(< ?= html::js_string($theme->item()->file_url()) ?>, full_dims[0], full_dims[1]);
      return false;
    });
    resize_dims = [< ?= $theme->item()->resize_width ?>, < ?= $theme->item()->resize_height ?>];
    $(".g-resized-link").click(function() {
      $.gallery_show_full_size(< ?= html::js_string($theme->item()->resize_url()) ?>, resize_dims[0], resize_dims[1]);
      return false;
    });
    // After the image is rotated or replaced we have to reload the image dimensions
    // so that the full size view isn't distorted.
    $("#g-photo").bind("gallery.change", function() {
      $.ajax({
        url: "< ?= url::site("items/dimensions/" . $theme->item()->id) ?>",
        dataType: "json",
        success: function(data, textStatus) {
          full_dims = data.full;
        }
      });
    });
  });
</script>
<style>
img.g-resize {
        width: 100%;
        height: auto;
}
</style>
<div id="g-item">
  < ?= $theme->photo_top() ?>
 
  < ?= $theme->paginator() ?>
 
  <div id="g-photo">
    < ?= $theme->resize_top($item) ?>
    < ? if (access::can("view_full", $item)): ?>
    <a href="<?= $item->file_url() ?>" title="< ?= t("View full size")->for_html_attr() ?>">
    < ? else: ?>
        </a><a href="<?= $item->resize_url() ?>" title="< ?= t("View full size")->for_html_attr() ?>">
    < ? endif; ?>
    < ?= $item->resize_img(array("id" => "g-item-id-{$item->id}", "class" => "g-resize")) ?>
        </a>
    < ?= $theme->resize_bottom($item) ?>
  </div>
 
  <div id="g-info">
    <h1>< ?= html::purify($item->title) ?></h1>
    <div>< ?= nl2br(html::purify($item->description)) ?></div>
  </div>
 
  < ?= $theme->photo_bottom() ?>
</div>

Web browser market share: Modern browser edition

Microsoft was quick to boast of Internet Explorer 9′s 2.5 million downloads in its first 24 hours—a number quickly eclipsed by Firefox 4, which garnered 7.1 million in its first day.

via Web browser market share: Modern browser edition.

Oh, Microsoft, just give up on IE already. Focus on Windows, Office and Sharepoint instead.

Restore one-click message selection in Gmail

If you’re like me, you REALLY miss the ability to select all your unread (or read) conversations with one click. With the new Gmail interface, you have to first click the drop-down menu, the click the desired selection option. That’s one click too many IMO, and extra mouse mileage that’s wearing down the poor little thing.

But naturally, when the Internet has a problem, the Internet also has a solution.

Using some CSS, and the Stylish extension for Firefox, it’s possible to get the old links back, and they actually look even better than before.

@namespace url(<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>);
/*
 Gmail: Select "links" restored
*/
@-moz-document domain("mail.google.com") {
 
/* move search results text down below Select links */
.VP5otc-pzeoBf.D.E .yS { padding-top: 25px !important; }
 
/* same height as before (more or less) */
.VP5otc-pzeoBf.D.E .nH { height: 22px !important; }
 
.VP5otc-pzeoBf.D.E &gt; .nH &gt; .nH.Cq &gt; div &gt; div &gt; .J-M.AW:nth-child(7) {
 position: relative !important;
 top: -4px !important;
 left: 15px !important; /* line up with 'Search ...' */
 display: inline !important;
 height: 16px !important;
}
.VP5otc-pzeoBf.D.E &gt; .nH &gt; .nH.Cq &gt; div &gt; div &gt; .J-M.AW:nth-child(7) &gt; .SK:before {
 content: "Select: " ; font-family: Arial ; color: black ;
}
.VP5otc-pzeoBf.D.E &gt; .nH &gt; .nH.Cq &gt; div &gt; div &gt; .J-M.AW:nth-child(7) &gt; .SK {
 -moz-box-shadow: none !important;
 -webkit-box-shadow: none !important;
 padding-top: 4px !important;
 padding-bottom: 2px !important;
 background-color: transparent !important;
 font-family: Verdana !important;
}
.VP5otc-pzeoBf.D.E &gt; .nH &gt; .nH.Cq &gt; div &gt; div &gt; .J-M.AW:nth-child(7) &gt; .SK.AX &gt; .J-N {
 display: inline-block !important;
 padding-left: 8px !important;
 padding-right: 8px !important;
 -moz-border-radius: 3px !important;
 -webkit-border-radius: 3px !important; /* WebKit */
 cursor: pointer !important;
}
.VP5otc-pzeoBf.D.E &gt; .nH &gt; .nH.Cq &gt; div &gt; div &gt; .J-M.AW:nth-child(7) &gt; .SK.AX &gt; .J-N:hover {
 background-color:#406480 !important;
 color:white !important;
}
/* optional bg: sort of a button look (dark/light bg with light/dark text) * /
.A1.D.E &gt; .nH &gt; .nH.Cq &gt; div &gt; div &gt; .J-M.AW:nth-child(7) &gt; .SK.AX &gt; .J-N:not(:hover) {
 background-color: #406480 !important;
} /* dark blue [Planets bg] */
 
}

Thanks to Matt Kruse. Original script source: http://userscripts.org/topics/67827