# Special quines and code golf, hooray!

Make a quine. Simple enough, except it has to be a palindrome and accept input.

Now, any side of a palindromic quine is one half of it. For example, one side of the hypothetical quine AAAA is AA. One side of AAAAA is AA (the center symbol is ignored).

Your job is to make a quine like this that accepts input. If the input is the whole quine, then the quine prints the left side of itself. If the input is either side of the quine then the quine prints itself. Of course, with quines with an odd number of symbols the center symbol is ignored. If the input is anything other than the cases specified, the program must do nothing.

This is code golf, so the shortest submission wins.

• It can be the right side, the left side or the quine itself. If anything else is inputted the program must do nothing. – Andrew Nov 25 '18 at 9:31
• @l4m2 From the spec it would need to print ; if the input is empty, so if ; is a nop it wouldn't be valid as far as I see. – Laikoni Nov 25 '18 at 14:46
• yee. the program must print nothing. – Andrew Nov 25 '18 at 15:24

# Javascript, 224 200 bytes

Prompts for input. I shaved off some bytes by using ES6 features. Still can probably be golfed a lot more.

(f=_=>{a=prompt();s=(f=${f})()/;r=[...s].reverse().join('');return a==s||a==r?s+r:a==s+r?s:""})()//)()}"":s?r+s==a:r+s?r==a||s==a nruter;)''(nioj.)(esrever.]s...[=r;/)()}f{$=f(=s;)(tpmorp=a{>=_=f(