diff options
author | Trevor Elliott <trevor@galois.com> | 2013-06-07 16:42:11 -0700 |
---|---|---|
committer | Trevor Elliott <trevor@galois.com> | 2013-06-07 16:48:17 -0700 |
commit | 8b5d3c6b75744cf5938f253d20f367999e92b1a7 (patch) | |
tree | b516a82c5b198fd080d265e56b3edf19d1180f10 /tools/addon-sdk-1.12/examples/reddit-panel/data/panel.js | |
parent | f37588f9a4c7c6b418c64f03d82d48ecd14da217 (diff) |
Remove the addon-sdk from the repo, and download it on demand
Diffstat (limited to 'tools/addon-sdk-1.12/examples/reddit-panel/data/panel.js')
-rw-r--r-- | tools/addon-sdk-1.12/examples/reddit-panel/data/panel.js | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/tools/addon-sdk-1.12/examples/reddit-panel/data/panel.js b/tools/addon-sdk-1.12/examples/reddit-panel/data/panel.js deleted file mode 100644 index 03f803c..0000000 --- a/tools/addon-sdk-1.12/examples/reddit-panel/data/panel.js +++ /dev/null @@ -1,35 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -// This is a content script. It executes inside the context of the Reddit page -// loaded into the panel and has access to that page's window object and other -// global objects (although the page does not have access to globals defined by -// this script unless they are explicitly attached to the window object). -// -// This content script is injected into the context of the Reddit page -// by the Panel API, which is accessed by the main add-on script in lib/main.js. -// See that script for more information about how the panel is created. - -$(window).click(function (event) { - var t = event.target; - - // Don't intercept the click if it isn't on a link. - if (t.nodeName != "A") - return; - - // Don't intercept the click if it was on one of the links in the header - // or next/previous footer, since those links should load in the panel itself. - if ($(t).parents('#header').length || $(t).parents('.nextprev').length) - return; - - // Intercept the click, passing it to the addon, which will load it in a tab. - event.stopPropagation(); - event.preventDefault(); - self.port.emit('click', t.toString()); -}); - -// Panels have an OS-specific background color by default, and the Mac OS X -// background color is dark grey, but Reddit expects its background to be white -// and looks odd when it isn't, so set it to white. -$("body").css("background", "white"); |