parent
7b65833c20
commit
baebac669e
4 changed files with 8 additions and 11 deletions
|
|
@ -328,7 +328,6 @@ def install_adblock(
|
||||||
if skip_firefox and browser_data[browser]['base'] == 'mozilla':
|
if skip_firefox and browser_data[browser]['base'] == 'mozilla':
|
||||||
continue
|
continue
|
||||||
exe_path = browser_data[browser].get('exe_path', None)
|
exe_path = browser_data[browser].get('exe_path', None)
|
||||||
function=run_program
|
|
||||||
if not exe_path:
|
if not exe_path:
|
||||||
if browser_data[browser]['profiles']:
|
if browser_data[browser]['profiles']:
|
||||||
print_standard(
|
print_standard(
|
||||||
|
|
@ -378,7 +377,6 @@ def install_adblock(
|
||||||
|
|
||||||
elif browser_data[browser]['base'] == 'ie':
|
elif browser_data[browser]['base'] == 'ie':
|
||||||
urls.append(IE_GALLERY)
|
urls.append(IE_GALLERY)
|
||||||
function=popen_program
|
|
||||||
|
|
||||||
# By using check=False we're skipping any return codes so
|
# By using check=False we're skipping any return codes so
|
||||||
# it should only fail if the program can't be run
|
# it should only fail if the program can't be run
|
||||||
|
|
@ -387,7 +385,7 @@ def install_adblock(
|
||||||
# installation status.
|
# installation status.
|
||||||
try_and_print(message='{}...'.format(browser),
|
try_and_print(message='{}...'.format(browser),
|
||||||
indent=indent, width=width,
|
indent=indent, width=width,
|
||||||
cs='Done', function=function,
|
cs='Done', function=popen_program,
|
||||||
cmd=[exe_path, *urls], check=False)
|
cmd=[exe_path, *urls], check=False)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -120,14 +120,9 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
# Configure software
|
# Configure software
|
||||||
print_info('Configuring programs')
|
print_info('Configuring programs')
|
||||||
print_standard(' (if stuck press CTRL+c to cancel this step).')
|
|
||||||
try:
|
|
||||||
install_adblock()
|
install_adblock()
|
||||||
except KeyboardInterrupt:
|
print_standard('Please enable uBlock Origin for all browsers.')
|
||||||
print_warning('Configuration interrupted.')
|
pause()
|
||||||
print_standard('Please confirm all browsers have adblock installed.')
|
|
||||||
if not ask('Continue to next step?'):
|
|
||||||
abort()
|
|
||||||
if global_vars['OS']['Version'] == '10':
|
if global_vars['OS']['Version'] == '10':
|
||||||
try_and_print(message='ClassicStart...',
|
try_and_print(message='ClassicStart...',
|
||||||
function=config_classicstart, cs='Done')
|
function=config_classicstart, cs='Done')
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,8 @@ if __name__ == '__main__':
|
||||||
# Install uBlock Origin
|
# Install uBlock Origin
|
||||||
print_info('Installing uBlock Origin')
|
print_info('Installing uBlock Origin')
|
||||||
install_adblock(just_firefox=True)
|
install_adblock(just_firefox=True)
|
||||||
|
print_standard('Please enable uBlock Origin in Firefox.')
|
||||||
|
pause()
|
||||||
|
|
||||||
# Cleanup
|
# Cleanup
|
||||||
print_info('Cleanup')
|
print_info('Cleanup')
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,8 @@ if __name__ == '__main__':
|
||||||
print_info('Configuring programs')
|
print_info('Configuring programs')
|
||||||
if answer_config_browsers:
|
if answer_config_browsers:
|
||||||
install_adblock(skip_firefox=D7_MODE)
|
install_adblock(skip_firefox=D7_MODE)
|
||||||
|
print_standard('Please enable uBlock Origin')
|
||||||
|
pause()
|
||||||
if global_vars['OS']['Version'] == '10':
|
if global_vars['OS']['Version'] == '10':
|
||||||
if answer_config_classicshell:
|
if answer_config_classicshell:
|
||||||
try_and_print(message='ClassicStart...',
|
try_and_print(message='ClassicStart...',
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue