Don't automatically show NSFW content

Fixes #472
This commit is contained in:
Lorenz Hübschle-Schneider 2014-10-16 15:50:36 +02:00
parent c136822f39
commit 4fd5ceadb2
3 changed files with 9 additions and 2 deletions

View file

@ -535,6 +535,12 @@ li.buffer.indent.private a {
padding-right: -15px; padding-right: -15px;
} }
.settings-help {
display: block;
margin: -5px 0 -3px 19px;
font-size: small;
}
/* */ /* */
/* Mobile layout */ /* Mobile layout */
/* */ /* */

View file

@ -348,7 +348,7 @@ $ openssl req -nodes -newkey rsa:4096 -keyout relay.pem -x509 -days 365 -out rel
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input type="checkbox" ng-model="noembed"> <input type="checkbox" ng-model="noembed">
Hide embedded content by default Hide embedded content by default<span class="text-muted settings-help">NSFW content will be hidden</small>
</label> </label>
</div> </div>
</form> </form>

View file

@ -19,7 +19,8 @@ weechat.directive('plugin', ['$rootScope', function($rootScope) {
$scope.displayedContent = ""; $scope.displayedContent = "";
$scope.plugin.visible = $rootScope.auto_display_embedded_content; // Auto-display embedded content only if it isn't NSFW
$scope.plugin.visible = $rootScope.auto_display_embedded_content && !$scope.plugin.nsfw;
// user-accessible hash key that is a valid CSS class name // user-accessible hash key that is a valid CSS class name
$scope.plugin.className = "embed_" + $scope.plugin.$$hashKey.replace(':','_'); $scope.plugin.className = "embed_" + $scope.plugin.$$hashKey.replace(':','_');