Deleting timeline activity from FB - facebook

I am trying to use iMacro to delete my FB timeline activity. I can easily record one action such as delete, hide, or unlike, but on my timeline these actions are interwined and thus the macro breaks down when I do a loop to, for example, delete activity.
Is there a way that the macro can check which type of post it is and then take the appropriate action.
For example:
TAB T=1
URL GOTO=https://www.facebook.com/myusername/allactivity?privacy_source=privacy_settings_page
TAG POS=1 TYPE=I ATTR=CLASS:mrs<SP>_2fmu<SP>customimg<SP>img<SP>sp_8g08g1<SP>sx_8e1c65&&TXT:
If option is to unlike then:
TAG POS=1 TYPE=SPAN ATTR=TXT:Unlike
TAG POS=1 TYPE=INPUT:BUTTON ATTR=NAME:ok&&VALUE:Unlike
If option is to delete then:
TAG POS=1 TYPE=I ATTR=CLASS:mrs<SP>_2fmu<SP>customimg<SP>img<SP>sp_8g08g1<SP>sx_8e1c65&&TXT:
TAG POS=1 TYPE=SPAN ATTR=TXT:Delete
TAG POS=1 TYPE=LABEL ATTR=CLASS:uiButton<SP>uiButtonLarge<SP>uiButtonConfirm&&TXT:
TAG POS=1 TYPE=LABEL ATTR=CLASS:uiButton<SP>uiButtonLarge<SP>uiButtonConfirm&&TXT:
If option is to hide then:
TAG POS=1 TYPE=I ATTR=CLASS:_2fmu<SP>img<SP>sp_8g08g1<SP>sx_8e1c65<SP>customimg&&TXT:
TAG POS=1 TYPE=SPAN ATTR=TXT:Hidden<SP>from<SP>Timeline
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:u_13_2 ATTR=ID:u_13_1
An alternative would be to do the first round of just (i.e.)deletes and the macro would just skip is that is not the action to be taken. Or open to any other solutions to deleting timeline data.
Thanks,

use this:
SET !ERRORIGNORE YES
and it will not stop the macro on error, other than that you'll need to convert your script to javascript format (or similar) to implement real IF statement procedures

Related

Add attribute to anchor in AEM Rich text editor Link

I am working on making one of the AEM website of my client accessible. For the same, I want "aria-label" attribute should be added(value can be provided in authoring dialogue) to the anchor tag, when the target selected is "New tab".
Could not find much around it, following link describes we can customize the rtePlugin/linkPicker. But could not figure out my problem. Any help/guidance
http://experience-aem.blogspot.com/2017/06/aem-63-touch-ui-rte-rich-text-editor-color-picker-plugin-inplace-dialog-edit.html
Option 1) Reuse Alt Text/title from otb anchor link. No need to customize dialog. When Alt Text is authored otb will populate title like this <a title="Google" href="htttps://www.google.com">Google Link</a>
,
You will then need to Write a Link Transformer to copy title into aria-label. The rewriter will look for anchor tags; if title is present, copy into a new attribute aria-label and rewrite the anchor. If link rewriter is difficult, you can also rewrite the rte text from a sling model while saving the RTE text. Use a Jsoup parser to parse HTML, rewrite by copying title to aria-label and write back into JCR.
Option 2) Adding new text box for aria-label to dialog. You can refer to this blog post. But this option is needed only when Alt text is different from aria-label which I wonder why. Usually aria-label and titles are same and option 1 above will suffice.
So Finally was able to add aria-label attribute with some troubleshooting. Moreover the steps in the links mentioned above are same. Want to add additional details which I faced issue with
Adding new field
Follow the steps mentioned in the blog
After adding the field as mentioned in the blog the newly added attribute will get filtered by AEM. You will see the following error in error.log file
Error : "26.09.2017 12:40:42.804 INFO [0:0:0:0:0:0:0:1 [1506447642680] GET /content/we-retail/language-masters/en.html HTTP/1.1] org.apache.sling.xss.impl.HtmlToHtmlContentContext AntiSamy warning: The a tag contained an attribute that we could not process. The rel attribute had a value of "bookmark". This value could not be accepted for security reasons. We have chosen to remove this attribute from the tag and leave everything else in place so that we could process the input."
Solution: Declare the attribute in the AntiSamy configuration file in CRXDE Light.
Note : make the following changes in /apps/cq/xssprotection/config.xml (overlaying /libs/cq/xssprotection/config.xml), for Sightly/HTL its /libs/sling/xss/config.xml
Copy /libs/cq/xssprotection/config.xml to /apps/cq/xssprotection/config.xml.
Open /apps/cq/xssprotection/config.xml.
In the common-attributes section, add the following target attribute declaration.
<attribute name="aria-label>
<regexp-list>
<regexp value="[a-zA-Z0-9-_\$]+" />
</regexp-list>
</attribute>
Find the tag declaration by searching the term <tag name="a".
Add the line below in the list of attributes:
<attribute name="aria-label" />
Save the file. Now, the link will open in a new window if the option is selected.

TinyMCE invalid_elements - how to remove from HTML and from DOM

I'm having problems with removing tags from TimyMCE. (last version)
invalid_elements : 'br' or valid_elements : 'p/br'
This delete/replace the tag on ctrl+enter from html source but not from the DOM in the editor.
How can i prevent the use of invalid elements in the Editor DOM?
Simply said i want to prevent using a tag not only in the generated html source, but also in the Editor too.
What do you want to have happen when someone presses shift+enter if you don't want the <br> to be used? You can capture any keydown event in the editor and then choose what you want to do instead.
This TinyMCE Fiddle captures the keydown event and simply ignores shift+enter. You can certainly do something different if needed.
http://fiddle.tinymce.com/vogaab/1
EDIT: Based on your comment I updated the fiddle:
http://fiddle.tinymce.com/vogaab/2
...in this version I modify the event to make the event.shiftKey attribute false and then let the event finish as normal. I no longer get a <br> but instead get a <p> tag whether I use enter or shift+enter

Set page title and project header separate

I've been messing around with Github Pages and I was wondering if there any way to set the <title> tag and the project header title separate?
I want to set the project header to an image but when I set the title attribute in the _config.yml file the project header is an image as expected but now the site's title is the <img> tag as a string literal.
Any way to separate them?
The <title> tag content is controlled by whatever liquid tags are set in the _layouts directory. So you could define it in your layouts file(s) to use a different attribute, or go as far as hardcoding a value there.
Example:
If you have a _layouts\default.html file with a line that says:
<title>{{ page.title }}</title>
...you could edit that to a different value and it will be used for the <title>

RTE AEM6.2 By default Addition of p tag

I tried removing the p tag from RTE of AEM(6.2) by adding the property removeSingleParagraphContainer :true in rte text node.It removes the p tag from first paragraph but as soon as we enter the next paragarph the p tag gets added.It seems the component needed to be customized from out of box.
Is there any other way can we achieve this.
The functionality which I require is that no tag should get added until users selects a specific formatter tag from paraformat.
Thanks for the Help!
I've struggled with this issue once upon a time. As far as I know there is no way to do it with configuration. You'll need custom code to get rid of these <p>'s.
One thing I can advise is that it's far easier to do it from within your code once already reading the property from JCR - then tweaking the aem component not to add it.
This is the default behaviour of RTE OOTB. removeSingleParagraphContainer is for backward compatibility and not the behaviour you are expecting.
By default, pressing Enter will add a <p> tag but if you press Shift+Enter (at least on Mac, not sure on Windows) you will get a <br> tag which is probably what you are expecting.
The only way to change the behaviour is to overlay the RTE control.

iMacros code to like Friends Facebook statuses

I have written this code in iMacros, a Firefox AddOn
It is designed to like all of my friends Facebook Statuses. I have a .csv file which contains a link to each of their Facebook profiles.
The code runs but it does not like my friends statuses.
Can anyone see what might be wrong with it?
VERSION BUILD=8300326 RECORDER=FX
SET !ERRORIGNORE YES
SET !TIMEOUT_TAG 1
SET !TIMEOUT_STEP 1
SET !TIMEOUT_PAGE 30
SET !REPLAYSPEED FAST
TAB T=1
SET !DATASOURCE C:\Users\TanPham\Documents\iMacros\List<sp>Friend<sp>Facebook.csv
SET !DATASOURCE_COLUMNS 1
SET !LOOP 1
SET !DATASOURCE_LINE {{!LOOP}}
URL GOTO={{!COL1}}
SET !ENCRYPTION NO
WAIT SECONDS=5
TAG POS={{!LOOP}} TYPE=A ATTR=Title:Like<SP>this
WAIT SECONDS=4
TAG POS={{!LOOP}} TYPE=A ATTR=Title:Like<SP>this
WAIT SECONDS=4
Why are you Using TAG POS={{!LOOP}}?
Do your 'Like' Buttton's positions change after each page refresh? If yes, you might use recording mode to export HTML elements.