@@ -11,9 +11,7 @@ import "sumo/js/codemirror.sumo-hint";
1111import "sumo/js/codemirror.sumo-mode" ;
1212import "sumo/js/protocol" ;
1313import AjaxPreview from "sumo/js/ajaxpreview" ;
14- import AjaxVote from "sumo/js/ajaxvote" ;
1514import { initDiff } from "sumo/js/diff" ;
16- import { getQueryParamsAsDict , getReferrer , getSearchQuery , unquote } from "sumo/js/main" ;
1715import Marky from "sumo/js/markup" ;
1816import ShowFor from "sumo/js/showfor" ;
1917
@@ -31,18 +29,7 @@ import ShowFor from "sumo/js/showfor";
3129 initPrepopulatedSlugs ( ) ;
3230 initDetailsTags ( ) ;
3331
34- if ( $body . is ( '.document' ) ) { // Document page
35- // Put last search query into search box
36- $ ( '#support-search input[name=q]' )
37- . val ( unquote ( $ . cookie ( 'last_search' ) ) ) ;
38- new ShowFor ( ) ;
39- addReferrerAndQueryToVoteForm ( ) ;
40- new AjaxVote ( '.document-vote form' , {
41- positionMessage : false ,
42- replaceFormWithMessage : true ,
43- removeForm : true
44- } ) ;
45- } else if ( $body . is ( '.review' ) ) { // Review pages
32+ if ( $body . is ( '.review' ) ) { // Review pages
4633 new ShowFor ( ) ;
4734 initNeedsChange ( ) ;
4835
@@ -438,18 +425,6 @@ import ShowFor from "sumo/js/showfor";
438425 } ) ;
439426 }
440427
441- function addReferrerAndQueryToVoteForm ( ) {
442- // Add the source/referrer and query terms to the helpful vote form
443- var urlParams = getQueryParamsAsDict ( ) ,
444- referrer = getReferrer ( urlParams ) ,
445- query = getSearchQuery ( urlParams , referrer ) ;
446- $ ( '.document-vote form' )
447- . append ( $ ( '<input type="hidden" name="referrer"/>' )
448- . attr ( 'value' , referrer ) )
449- . append ( $ ( '<input type="hidden" name="query"/>' )
450- . attr ( 'value' , query ) ) ;
451- }
452-
453428 function initNeedsChange ( ) {
454429 // Hide and show the comment box based on the status of the
455430 // "Needs change" checkbox. Also, make the textarea required
0 commit comments