OLD | NEW |
1 /* | 1 /* |
2 * This file is part of Adblock Plus <http://adblockplus.org/>, | 2 * This file is part of Adblock Plus <http://adblockplus.org/>, |
3 * Copyright (C) 2006-2013 Eyeo GmbH | 3 * Copyright (C) 2006-2013 Eyeo GmbH |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
8 * | 8 * |
9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 | 277 |
278 | 278 |
279 /** | 279 /** |
280 * Enables or disables Acceptable Ads | 280 * Enables or disables Acceptable Ads |
281 */ | 281 */ |
282 public void setAcceptableAdsEnabled(boolean enabled) | 282 public void setAcceptableAdsEnabled(boolean enabled) |
283 { | 283 { |
284 abpEngine.setAcceptableAdsEnabled(enabled); | 284 abpEngine.setAcceptableAdsEnabled(enabled); |
285 } | 285 } |
286 | 286 |
| 287 public String getAcceptableAdsUrl() |
| 288 { |
| 289 final String documentationLink = abpEngine.getDocumentationLink(); |
| 290 final String locale = getResources().getConfiguration().locale.toString().re
place("_", "-"); |
| 291 return documentationLink.replace("%LINK%", "acceptable_ads").replace("%LANG%
", locale); |
| 292 } |
| 293 |
287 /** | 294 /** |
288 * Returns ElemHide selectors for domain. | 295 * Returns ElemHide selectors for domain. |
289 * | 296 * |
290 * @param domain The domain | 297 * @param domain The domain |
291 * @return A list of CSS selectors | 298 * @return A list of CSS selectors |
292 */ | 299 */ |
293 public String[] getSelectorsForDomain(final String domain) | 300 public String[] getSelectorsForDomain(final String domain) |
294 { | 301 { |
295 if (!filteringEnabled) | 302 if (!filteringEnabled) |
296 return null; | 303 return null; |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 Log.e(TAG, e.getMessage(), e); | 479 Log.e(TAG, e.getMessage(), e); |
473 } | 480 } |
474 | 481 |
475 // Set crash handler | 482 // Set crash handler |
476 Thread.setDefaultUncaughtExceptionHandler(new CrashHandler(this)); | 483 Thread.setDefaultUncaughtExceptionHandler(new CrashHandler(this)); |
477 | 484 |
478 // Initiate update check | 485 // Initiate update check |
479 scheduleUpdater(0); | 486 scheduleUpdater(0); |
480 } | 487 } |
481 } | 488 } |
OLD | NEW |