Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/315535

Change subject: Get rid of ?venotify= from URL post-save
......................................................................

Get rid of ?venotify= from URL post-save

Use history.replaceState if available to get rid of the venotify query
parameter to avoid polluting URLs.

Ideally this would just use a cookie like the core post-edit
notification.

Change-Id: I6ce142012053e2fc18dd44fd0f7b82914acea076
---
M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/35/315535/1

diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js 
b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
index bcd39b4..a84571f 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
@@ -1047,6 +1047,10 @@
                        } );
 
                        delete uri.query.venotify;
+                       // Get rid of the ?venotify= from the URL
+                       if ( history.replaceState ) {
+                               history.replaceState( null, document.title, uri 
);
+                       }
                }
        } );
 }() );

-- 
To view, visit https://gerrit.wikimedia.org/r/315535
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6ce142012053e2fc18dd44fd0f7b82914acea076
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Legoktm <legoktm.wikipe...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to