This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| grep -o '{{.*}}' ./some_file_with_liquid.html | sort | uniq > ./variable_list.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script type="text/javascript"> | |
| (function($) { | |
| // add values to be hidden to this array | |
| var hide = ['Hide this value', 'Also hide this value']; | |
| $("select.default option").each(function() { | |
| if ((function(option) { | |
| for (var i = hide.length - 1; i >= 0; i--) { | |
| if (option.value == hide[i]) {return true;} | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- | |
| 1. Navigate to Admin > Channels > Support Center > Web Themes | |
| 2. Click on the name of your live web theme | |
| 3. Click 'Advanced Themes' | |
| 4. Scroll down on the left-hand side and click into the "CSAT (New)" section | |
| 5. Add the <script> tag below to the very bottom of the "CSAT (New)" section. | |
| --> | |
| <script> | |
| $(function() { | |
| $('#customer-feedback-form').validate({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'desk_api' | |
| ########## | |
| # config # | |
| ########## | |
| # Provide username and password below, as well as change "MYSUBDOMAIN" to | |
| # your own Desk.com subdomain. | |
| auth = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/user/bin/env ruby | |
| require 'desk_api' | |
| DeskApi.configure do |config| | |
| config.username = 'YOUR_EMAIL_ADDRESS_HERE' | |
| config.password = 'YOUR_PASSWORD_HERE' | |
| config.endpoint = 'https://YOUR_SUBDOMAIN_HERE.desk.com' | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- Place this at the bottom of page_article just beneath #footer --> | |
| <script type="text/javascript"> | |
| (function($) { | |
| $(function() { | |
| var default_language = "{{site.default_language}}"; | |
| var current_locale = "{{system.locale}}"; | |
| if (current_locale != default_language) { | |
| var default_portal_locale = /\/customer\/portal\/articles|\/customer\/portal\/topics/ | |
| var portal_links = $(".article-content a"); | |
| for (var elem = portal_links.length - 1; elem >= 0; elem--) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'desk_api' | |
| def desk | |
| @desk ||= DeskApi::Client.new({ | |
| username: 'LOGIN_EMAIL', | |
| password: 'PASSWORD', | |
| endpoint: 'https://SUBDOMAIN.desk.com' | |
| }) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script type="text/javascript" src="https://gist.githubusercontent.com/anonymous/649e238d9b6d0fe9c395/raw/f918dd9cd61846797af65a32b0cdef1457919dde/textile.js"></script> | |
| <script type="text/javascript"> | |
| (function($) { | |
| $(function() { | |
| $(document).ajaxComplete(function() { | |
| $(".chat_message_text.chat_message_agent") | |
| .filter(function() { return !($(this).hasClass('textile_rendered')) }) | |
| .each(function() { render_textile($(this)) }); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| body {white-space: pre;font-family: monospace;font-size: 14px;background: #272822;color: #f8f8f2;} | |
| .property {font-weight: bold;color: #d0d0d0;} | |
| .type-null {color: #ae81ff;} | |
| .type-boolean {color: #9effff;} | |
| .type-number {color: #ae81ff;;} | |
| .type-string {color: #e6db74;} | |
| .callback-function {color: gray;} | |
| .collapser:after {content: "-";color: #f92672;} | |
| .collapsed > .collapser:after {content: "+";color: #a6e22e;} | |
| .ellipsis:after {content: " … ";} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/lunr.js/0.5.7/lunr.min.js"></script> | |
| <script type="text/javascript"> | |
| // NOTE: This is code strictly a very simple proof of concept, has not been | |
| // tested, and should be carefully reviewed before any use | |
| // To use, copy and paste the example to your support center portal theme | |
| // for "Page (Search Result)" | |
| // Example search results can be viewed at https://support.desk.com/customer/portal/articles/search?q=agent&t=525381&b_id=6346 |
NewerOlder