Jump to content

User:Ans/javascript

From Wikipedia, the free encyclopedia
This is the current revision of this page, as edited by Qwerfjkl (bot) (talk | contribs) at 14:39, 8 May 2022 (top: Replaced deprecated <source> tags with <syntaxhighlight>). The present address (URL) is a permanent link to this version.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

permalink

  1. v1
    javascript:location+=(location.href.indexOf('?')<0?'?':'&')+$('#t-permalink a')[0].href.replace(/.*&/,'');void(0)
    
  2. v2
    javascript:location+=$('#t-permalink a')[0].href.replace(/.*(&)/,location.href.indexOf('?')<0?'?':'$1');void(0)
    
  3. v3
    javascript:location.search+=$('#t-permalink a')[0].href.replace(/.*(&)/,location.search==''?'?':'$1');void(0)
    

edit

javascript:location+=location.href.indexOf('?')<0?'?action=edit':'&action=edit';void(0)