-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changed Uservoice widget to show only when user is signed in
- Loading branch information
Showing
2 changed files
with
18 additions
and
31 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,22 @@ | ||
<!-- <% if user_signed_in? %> | ||
<div id='uservoice'> | ||
<script type="text/javascript"> | ||
var uvOptions = {}; | ||
(function() { | ||
var uv = document.createElement('script'); uv.type = 'text/javascript'; uv.async = true; | ||
uv.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'widget.uservoice.com/CqU64j7S3jUTXzgbhFp9oA.js'; | ||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(uv, s); | ||
})(); | ||
</script> | ||
</div> | ||
<% end %> --> | ||
|
||
<!-- UserVoice JavaScript SDK (only needed once on a page) --> | ||
<script>(function(){var uv=document.createElement('script');uv.type='text/javascript';uv.async=true;uv.src='//widget.uservoice.com/CqU64j7S3jUTXzgbhFp9oA.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(uv,s)})()</script> | ||
|
||
<!-- A tab to launch the Classic Widget --> | ||
<script> | ||
UserVoice = window.UserVoice || []; | ||
UserVoice.push(['showTab', 'classic_widget', { | ||
mode: 'full', | ||
primary_color: '#70ba21', | ||
link_color: '#1eafd7', | ||
default_mode: 'feedback', | ||
forum_id: 147006, | ||
tab_label: 'Feedback & Support', | ||
tab_color: '#70ba21', | ||
tab_position: 'middle-right', | ||
tab_inverted: false | ||
}]); | ||
</script> | ||
<% if user_signed_in? %> | ||
<div id='uservoice'> | ||
<script> | ||
UserVoice = window.UserVoice || []; | ||
UserVoice.push(['showTab', 'classic_widget', { | ||
mode: 'full', | ||
primary_color: '#70ba21', | ||
link_color: '#1eafd7', | ||
default_mode: 'feedback', | ||
forum_id: 147006, | ||
tab_label: 'Feedback & Support', | ||
tab_color: '#70ba21', | ||
tab_position: 'middle-right', | ||
tab_inverted: false | ||
}]); | ||
</script> | ||
</div> | ||
<% end %> |
This file contains 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