How to eliminate “Share” on your journal

Work in progress.

This technique only applies if you have a paid/permanent account.

With LJ’s recent re-introduction of the Share function many people are again concerned with the un-attributed spreading of their own content. You can remove the link but it requires working with S2; you can’t remove it with CSS. Instructions for un-themed standard layouts (Smooth Sailing, Refried Paper, etc… Basically, any style where you accomplished everything through CSS instead of S2 coding.) will be at the end of this entry, with specific code replacements in the comments. If you’re already using a custom layout or theme please read on.

You need to be comfortable editing either your layout or your theme layer. If you’re not yet comfortable with that, please check out the tutorials available at , particularly Creating and Using a Theme Layer and Renaming edit and memories links.


Back already? Okay, here we go.

1) Identify the layout and theme layers to your current journal style. Go to Your Styles and look for the bolded entry on the list, the one with the greyed-out “Use” button. This is your current style. Click on “Edit” and look for the Layout and Theme dropdown choices. Note which ones are currently selected – there may be a name, or there may be a number, or possibly both. Write it all down.

2) Okay, next we’re going to look through the raw code for your layout and theme to find the function that prints the Share link.

2a) If both your layout and theme only had a name, but no number, then you can STOP now. Skip to step A.

2b) If either or both of your layout or theme had a number, add it to the end of this URL in place of the x’s and go to the resulting address(es): http://www.livejournal.com/customize/advanced/layerbrowse.bml?id=xxxxxx
In our example here the theme layer is #27411366, so we’d go to
http://www.livejournal.com/customize/advanced/layerbrowse.bml?id=27411366

3) On each of the pages you now have open (one for your layout and one for your theme, or maybe just the one) you’re now going to click on the link that says “Raw Source Code”.

4) You’re no looking at the raw code that powers your style. Starting with the theme layer code look around for the function that prints out the links for each entry, including the edit, memories, share, and flag links. You can identify it because it will have the term link_keyseq in it somewhere. You might find that term more than once – if you do, look for the function called Entry::something or EntryPage::something or possibly even EntryLite::something. Any function that starts out with Comment::something is the one that prints out the links for a comment, so ignore it.

4a) If you finish searching through code of your theme layer and didn’t find link_keyseq then start again in the code for your layout layer. If you didn’t open up the code for your layout layer because it only had a name then STOP. You may now proceed to step A.

4b) If you finish searching through the code of your layout layer and can’t find link_keyseq in there either, then STOP. Proceed to step B.

5) Once you find the function copy the entire thing to your clipboard. Make sure to copy the entire function, from the word function at the beginning to the last curly brace (}) at the end. This will be, except under very extraordinary circumstances, the last closing brace before the next function begins.

Remember that curly braces come in pairs, and unless your custom layout or theme layer is written very poorly all pairs of curly braces should be lined up vertically with each other. A left brace – { – opens up a function while a right brace – } – closes a function. If you’re not sure if you’ve copied the entire function count the braces – count up one for each left brace and down one for each right brace. When you reach zero you’ve found the end of the function.

6) Go to the Your Layers page.

6a) If you found the function in your theme layer or your edit layer and you have the capability to edit it, then do so according to the instructions in step 7.

6b) If the function is in a theme layer or custom layout layer that you can’t edit then create a theme layer as instructed in the howto up above. Copy the entire contents of the theme layer that you’ve currently using, and paste them into your new theme layer. Paste the function you found in step 5 into this theme layer.

7) Now, to edit the function and get rid of the Share link. Look at the function that you found in step 5. Right after the line that says foreach var string stringname ($.link_keyseq) { or foreach var string stringname ($.entry.link_keyseq) { we’re going to add a new line. Add

if ($stringname != "share") {

. Then, finding the right brace that closes the foreach var string sub-function, add another right brace on a new line immediately above it. Take a look at the specific code examples in the comments to see how this should look.

8) Compile the layer.

9) Go back to the Your Styles page and click edit next to your current style. Choose the theme layer that you just created. Click “Save Changes”.

10) Check your journal. The Share link should now be gone.

A) If you’re using a standard layout then this should be very simple. Go to the Public Layers page and look for the name of your