Donate

Be part of the solution.

Help AARP Foundation win back opportunity for struggling Americans 50 and over.

Charity Rating

AARP Foundation earns high rating for accountability from a leading charity evaluator. Read

Supporter
Spotlight

Every year, AARP Foundation helps millions of struggling older adults 50 and over win back opportunity. We couldn't do it without the generous support of individuals and institutions.

Connect with the
Foundation

Email:

FDN-Giving@aarp.org

 

Toll-free Nationwide:

1-800-775-6776

 

Toll-free TTY:

877-434-7598

 

AARP Foundation Tax ID

52-0794300

AARP Foundation
Annual Reports

AARP Foundation works to ensure that low-income vulnerable older Americans have nutritious food, affordable housing, a steady income, and strong and sustaining social bonds. We collaborate with individuals and organizations who share our commitment to innovation and our passion for problem solving. Supported by vigorous legal advocacy, we create and advance effective solutions that help struggling older adults transform their lives. AARP Foundation is AARP’s affiliated charity.

 

 

Featured
Programs & Services

AARP Tax Aide

AARP Foundation Tax-Aide

This program offers free assistance with tax-return preparation. Go

Couple standing outside home, Create the Good

Housing Solutions Center

This program offers free HUD-certified counseling and assistance to 50-plus homeowners who are at risk of foreclosure. Go

grandmother with her two grandaughters

AARP Benefits QuickLink

See if you qualify for public assistance and you can save money on health care, medication, food, utilities, and more! Go

Medical team at a computer, AARP Foundation Back to Work 50+

BACK TO WORK 50+

We are partnering with workforce services providers to strengthen the bridge between 50+ job candidates and respected employers. Go

// =============================================== // AdBlock detector // // Attempts to detect the presence of Ad Blocker software // and notify listener of its existence. // Copyright (c) 2015 IAB // // The MIT License (MIT) // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. // =============================================== /** * @name window.adblockDetector * * IAB Adblock detector. * Usage: window.adblockDetector.init(options); * * Options object settings * * @prop debug: boolean * Flag to indicate additional debug output should be printed to console * * @prop found: @function * Callback function to fire if adblock is detected * * @prop notfound: @function * Callback function to fire if adblock is not detected. * NOTE: this function may fire multiple times and give false negative * responses during a test until adblock is successfully detected. * * @prop complete: @function * Callback function to fire once a round of testing is complete. * The test result (boolean) is included as a parameter to callback * * example: window.adblockDetector.init( { found: function(){ ...}, notFound: function(){...} } ); * * */ "use strict"; (function(win) { var version = '1.0'; var ofs = 'offset', cl = 'client'; var noop = function() {}; var testedOnce = false; var testExecuting = false; var isOldIEevents = (win.addEventListener === undefined); /** * Options set with default options initialized * */ var _options = { loopDelay: 50, maxLoop: 5, debug: true, found: noop, // function to fire when adblock detected notfound: noop, // function to fire if adblock not detected after testing complete: noop // function to fire after testing completes, passing result as parameter } function parseAsJson(data) { var result, fnData; try { result = JSON.parse(data); } catch (ex) { try { fnData = new Function("return " + data); result = fnData(); } catch (ex) { log('Failed secondary JSON parse', true); } } return result; } /** * Ajax helper object to download external scripts. * Initialize object with an options object * Ex: { url : 'http://example.org/url_to_download', method: 'POST|GET', success: callback_function, fail: callback_function } */ var AjaxHelper = function(opts) { var xhr = new XMLHttpRequest(); this.success = opts.success || noop; this.fail = opts.fail || noop; var me = this; var method = opts.method || 'get'; /** * Abort the request */ this.abort = function() { try { xhr.abort(); } catch (ex) {} } function stateChange(vals) { if (xhr.readyState == 4) { if (xhr.status == 200) { me.success(xhr.response); } else { // failed me.fail(xhr.status); } } } xhr.onreadystatechange = stateChange; function start() { xhr.open(method, opts.url, true); xhr.send(); } start(); } /** * Object tracking the various block lists */ var BlockListTracker = function() { var me = this; var externalBlocklistData = {}; /** * Add a new external URL to track */ this.addUrl = function(url) { externalBlocklistData[url] = { url: url, state: 'pending', format: null, data: null, result: null } return externalBlocklistData[url]; } /** * Loads a block list definition */ this.setResult = function(urlKey, state, data) { var obj = externalBlocklistData[urlKey]; if (obj == null) { obj = this.addUrl(urlKey); } obj.state = state; if (data == null) { obj.result = null; return; } if (typeof data === 'string') { try { data = parseAsJson(data); obj.format = 'json'; } catch (ex) { obj.format = 'easylist'; // parseEasyList(data); } } obj.data = data; return obj; } } var listeners = []; // event response listeners var baitNode = null; var quickBait = { cssClass: 'pub_300x250 pub_300x250m pub_728x90 text-ad textAd text_ad text_ads text-ads text-ad-links' }; var baitTriggers = { nullProps: [ofs + 'Parent'], zeroProps: [] }; baitTriggers.zeroProps = [ ofs + 'Height', ofs + 'Left', ofs + 'Top', ofs + 'Width', ofs + 'Height', cl + 'Height', cl + 'Width' ]; // result object var exeResult = { quick: null, remote: null }; var findResult = null; // result of test for ad blocker var timerIds = { test: 0, download: 0 }; function isFunc(fn) { return typeof(fn) == 'function'; } /** * Make a DOM element */ function makeEl(tag, attributes) { var k, v, el, attr = attributes; var d = document; el = d.createElement(tag); if (attr) { for (k in attr) { if (attr.hasOwnProperty(k)) { el.setAttribute(k, attr[k]); } } } return el; } function attachEventListener(dom, eventName, handler) { if (isOldIEevents) { dom.attachEvent('on' + eventName, handler); } else { dom.addEventListener(eventName, handler, false); } } function log(message, isError) { if (!_options.debug && !isError) { return; } if (win.console && win.console.log) { if (isError) { console.error('[ABD] ' + message); } else { console.log('[ABD] ' + message); } } } var ajaxDownloads = []; /** * Load and execute the URL inside a closure function */ function loadExecuteUrl(url) { var ajax, result; blockLists.addUrl(url); // setup call for remote list ajax = new AjaxHelper({ url: url, success: function(data) { log('downloaded file ' + url); // todo - parse and store until use result = blockLists.setResult(url, 'success', data); try { var intervalId = 0, retryCount = 0; var tryExecuteTest = function(listData) { if (!testExecuting) { beginTest(listData, true); return true; } return false; } if (findResult == true) { return; } if (tryExecuteTest(result.data)) { return; } else { log('Pause before test execution'); intervalId = setInterval(function() { if (tryExecuteTest( result.data) || retryCount++ > 5) { clearInterval( intervalId); } }, 250); } } catch (ex) { log(ex.message + ' url: ' + url, true); } }, fail: function(status) { log(status, true); blockLists.setResult(url, 'error', null); } }); ajaxDownloads.push(ajax); } /** * Fetch the external lists and initiate the tests */ function fetchRemoteLists() { var i, url; var opts = _options; for (i = 0; i