Skip to content

Instantly share code, notes, and snippets.

@connorclarklindh
Created January 22, 2017 12:11
Show Gist options
  • Save connorclarklindh/7d3bc67a99c4f6e5d94869cff50d912d to your computer and use it in GitHub Desktop.
Save connorclarklindh/7d3bc67a99c4f6e5d94869cff50d912d to your computer and use it in GitHub Desktop.
imacros code to move through a list of facebook updates under "your posts" and automate the removal process. This version requires knowledge of the start position. If running without a known start position from a newly refreshed page use "2".
VERSION BUILD=844 RECORDER=CR
'This macro can only be run on a fully loaded page with the updates that you want to remove loaded.'
'This macro also ignores all errors and needs to be stopped manually if it fails / gets stuck.'
'Future updates to facebook may break this code. Use at your own risk.'
PROMPT "Please enter the start position (POS):" POSITION
SET DELAY 2 'modify this delay based on how quickly your browser loads prompts. For me anything less than 2 messed things up.'
SET !ERRORIGNORE YES
'these are the three post types that I had on my facebook "your posts" section.'
TAG POS={{POSITION}} TYPE=SPAN ATTR=CLASS:_55pe&&TXT:
TAG POS=1 TYPE=A ATTR=ID:u_jsonp_*_*
TAG POS=1 TYPE=I ATTR=CLASS:mrs<SP>_2fmu<SP>img<SP>sp_Z2S2FUU_cP__2x<SP>sx_1216b8&&TXT:
WAIT SECONDS = {{DELAY}}
TAG POS={{POSITION}} TYPE=SPAN ATTR=TXT:Delete
WAIT SECONDS = {{DELAY}}
TAG POS=1 TYPE=BUTTON FORM=ID:u_*_1 ATTR=TXT:Delete<SP>Post
WAIT SECONDS = {{DELAY}}
'copy from here to add more deletes into one macro'
ADD POSITION 2
TAG POS={{POSITION}} TYPE=SPAN ATTR=CLASS:_55pe&&TXT:
TAG POS=1 TYPE=A ATTR=ID:u_jsonp_*_*
TAG POS=1 TYPE=I ATTR=CLASS:mrs<SP>_2fmu<SP>img<SP>sp_Z2S2FUU_cP__2x<SP>sx_1216b8&&TXT:
WAIT SECONDS = {{DELAY}}
TAG POS={{POSITION}} TYPE=SPAN ATTR=TXT:Delete
WAIT SECONDS = {{DELAY}}
TAG POS=1 TYPE=BUTTON FORM=ID:u_*_1 ATTR=TXT:Delete<SP>Post
WAIT SECONDS = {{DELAY}}
'copy to here to add more deletes into one macro. paste below as many as you want to run.'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment