Skip to content

Instantly share code, notes, and snippets.

@jonkyops
Last active November 6, 2017 09:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jonkyops/17de48ead0c2452156b96ded3871abf7 to your computer and use it in GitHub Desktop.
Save jonkyops/17de48ead0c2452156b96ded3871abf7 to your computer and use it in GitHub Desktop.
# DISCLAIMER: No warranty. Please read this script carefully before running and use at your own risk!
# Clears gsScrollPos cookies from chrome as temporary workaround for https://github.com/deanoemcke/thegreatsuspender/issues/537
# PSSQLite module required: https://www.powershellgallery.com/packages/PSSQLite/ - https://github.com/RamblingCookieMonster/PSSQLite
# WARNING: This WILL close any running chrome processes. This script will also need to be run as administrator to stop the chrome processes.
Import-Module PSSQLite
$null = Get-Process 'chrome' -ErrorAction SilentlyContinue | %{$_.CloseMainWindow()}
$DataSource = '~\AppData\Local\Google\Chrome\User Data\Default\Cookies'
$Query = "delete from cookies where name like 'gsScrollPos-%'"
Invoke-SqliteQuery -DataSource $DataSource -Query $Query
Start-Process 'chrome'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment