{"id":410,"date":"2017-12-27T16:28:08","date_gmt":"2017-12-27T14:28:08","guid":{"rendered":"https:\/\/drinkits.optimisti.lv\/?p=410"},"modified":"2017-12-27T16:28:08","modified_gmt":"2017-12-27T14:28:08","slug":"how-to-disable-the-pdf-preview-feature-in-jira-7","status":"publish","type":"post","link":"https:\/\/www.drinkits.lv\/en\/2017\/12\/27\/how-to-disable-the-pdf-preview-feature-in-jira-7\/","title":{"rendered":"How to disable the PDF Preview feature in JIRA 7"},"content":{"rendered":"<ul>\n<li><img loading=\"lazy\" decoding=\"async\" class=\"alignright wp-image-416 \" src=\"https:\/\/www.drinkits.lv\/wp-content\/uploads\/2017\/12\/jira_pdf-300x287.jpg\" alt=\"\" width=\"151\" height=\"145\" srcset=\"https:\/\/www.drinkits.lv\/wp-content\/uploads\/2017\/12\/jira_pdf-300x287.jpg 300w, https:\/\/www.drinkits.lv\/wp-content\/uploads\/2017\/12\/jira_pdf.jpg 346w\" sizes=\"auto, (max-width: 151px) 100vw, 151px\" \/>Copy locally and extract Jira bundled plugin\u00a0<em>jira-fileviewer-plugin-7.2.1.jar<\/em> located at <em>.\/atlassian-jira\/WEB-INF\/atlassian-bundled-plugins<\/em><\/li>\n<li>In extracted folder open\u00a0<em>file-service.js<\/em> and delete (or wrap in comment) following lines:<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"js\" data-enlighter-highlight=\"17-19\">if (!featureManager.isFeatureEnabled(\"jira.fileviewer.disable.pdf\")) {\n    selectors.document.push(\"a[file-preview-type=document]\");\n}<\/pre>\n<pre class=\"EnlighterJSRAW\" data-enlighter-highlight=\"54-56\" data-enlighter-language=\"js\">addDocumentSelector: function addDocumentSelector(sel) {\n    pushSingleOrArray(selectors.document, sel);\n}<\/pre>\n<ul>\n<li>Remove same lines from minified\u00a0<em>file-service-min.js.\u00a0 <\/em>You can use JS <a href=\"https:\/\/www.browserling.com\/tools\/js-prettify\">prettify<\/a> and <a href=\"https:\/\/www.browserling.com\/tools\/js-minify\">minify<\/a> tools to do this.<\/li>\n<li>Save files. Put folder content in ZIP. Rename file to\u00a0<em>jira-fileviewer-plugin-7.2.1.jar,\u00a0<\/em>copy to server and restart Jira.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<a href=\"https:\/\/www.drinkits.lv\/en\/2017\/12\/27\/how-to-disable-the-pdf-preview-feature-in-jira-7\/\" rel=\"bookmark\" title=\"Permalink to How to disable the PDF Preview feature in JIRA 7\"><p>Copy locally and extract Jira bundled plugin\u00a0jira-fileviewer-plugin-7.2.1.jar located at .\/atlassian-jira\/WEB-INF\/atlassian-bundled-plugins In extracted folder open\u00a0file-service.js and delete (or wrap in comment) following lines: if (!featureManager.isFeatureEnabled(&#8220;jira.fileviewer.disable.pdf&#8221;)) { selectors.document.push(&#8220;a[file-preview-type=document]&#8221;); } addDocumentSelector: function addDocumentSelector(sel) { pushSingleOrArray(selectors.document, sel); } Remove same lines from minified\u00a0file-service-min.js.\u00a0 You can use JS prettify and minify tools to do this. Save files. Put folder content [&hellip;]<\/p>\n<\/a>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[7,8],"tags":[47,50,71],"class_list":{"0":"post-410","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-noderigi","7":"category-skripti","8":"tag-jira","9":"tag-jira-bundled-plugin","10":"tag-pdf-preview-feature","11":"h-entry","12":"hentry"},"_links":{"self":[{"href":"https:\/\/www.drinkits.lv\/en\/wp-json\/wp\/v2\/posts\/410","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.drinkits.lv\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.drinkits.lv\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.drinkits.lv\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.drinkits.lv\/en\/wp-json\/wp\/v2\/comments?post=410"}],"version-history":[{"count":0,"href":"https:\/\/www.drinkits.lv\/en\/wp-json\/wp\/v2\/posts\/410\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.drinkits.lv\/en\/wp-json\/wp\/v2\/media?parent=410"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.drinkits.lv\/en\/wp-json\/wp\/v2\/categories?post=410"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.drinkits.lv\/en\/wp-json\/wp\/v2\/tags?post=410"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}