Ok, if you are thinking for doing the conditional forward button then for this, i will suggest you to try with the following case, and i am sure that at there you will not get problem with this.
Code:
window:not([chromehidden~=toolbar]) #navigator-toolbox[iconsize=large][mode=icons] > :-moz-any(#nav-bar[currentset*="unified-back-forward-button,urlbar-container"],#nav-bar:not([currentset])) > #unified-back-forward-button
and also if you want to disable it then for that you will need to change anyone which are here::
- large icons mode
- icons only mode (not text)
- back/forward touching urlbar
Bookmarks