Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

- Updated logic to match on exact domain names

  • Loading branch information...
commit 36a45ece2d0d0cf0eb8730f5a46561f1c0a0d7cc 1 parent 3919886
@joeblau authored
Showing with 3 additions and 3 deletions.
  1. +1 −1  extension/manifest.json
  2. +2 −2 extension/stopsopa.js
View
2  extension/manifest.json
@@ -1,6 +1,6 @@
{
"name": "Stop SOPA",
- "version": "1.0.3",
+ "version": "1.1.0",
"description": "This extension lets you know which websites support SOPA.",
"icons": {
"16": "icon_16.png",
View
4 extension/stopsopa.js
@@ -1,14 +1,14 @@
var ss450img = chrome.extension.getURL("icon_450.png");
var downarr16x16img = chrome.extension.getURL("down-arr-16x16.png");
var close16x16img = chrome.extension.getURL("close-16x16.png");
+var cleanURL = document.URL.replace(/.*?:\/\/(www)?\.?/g, "");
for (idx in sopaSupporterList){
- if (document.URL.indexOf(sopaSupporterList[idx]) > -1) {
+ if (cleanURL.indexOf(sopaSupporterList[idx]) == 0) {
$(document).ready( function(){
var popupSopaDOM = document.createElement('div');
popupSopaDOM.setAttribute('id', 'howdy');
popupSopaDOM.innerHTML = 'This website supports Stop Online Piracy Act (SOPA). Find out more about what SOPA means by visiting <a href="http://fightforthefuture.org/pipa" style="color:white">http://fightforthefuture.org/pipa</a><br><img src="'+ss450img+'" border=0/><p>Press <em>Esc</em> or click on the <strong>X</strong> to the right to dismiss me!</p>';
document.body.appendChild(popupSopaDOM);
-
$( '#howdy' ).howdyDo({
action : 'scroll',
effect : 'slide',
Please sign in to comment.
Something went wrong with that request. Please try again.