Showing 451 of 1,081 total issues
Function mediaTagHTML
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
mediaTagHTML() {
const wrapper = document.createElement('div');
const mediaElement = document.createElement(this.props.tagName);
mediaElement.setAttribute('preload', 'none');
Function goTo
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.goTo = function(page, options) {
options = options || {};
if (page.length && !page.is(currentPage)) {
var cancelled = false;
Function renderControlBar
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function renderControlBar(props, darkBackground, fadedOut) {
return (
<div onFocus={props.onFocus}
onBlur={props.onBlur}
onMouseEnter={props.onMouseEnter}
Function watchPlayer
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function watchPlayer(player, actions) {
player.on('loadedmetadata', () => actions.metaDataLoaded(player.currentTime(), player.duration()));
player.on('loadeddata', () => actions.dataLoaded());
player.on('progress', () => actions.progress(player.bufferedEnd()));
Method video_file_video_tag
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def video_file_video_tag(video_file, options = {})
defaults = {
crossorigin: 'anonymous',
class: [
'player video-js video-viewport vjs-default-skin',
Method create_files
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def create_files(draft_entry, file_type, file_data_by_name, skip_encoding = false)
file_data_by_name.transform_values do |data|
say(" creating #{file_type} file from #{data['url']}")
file_state = %i[image text_track].include?(file_type) ? 'processed' : 'uploading'
Consider simplifying this complex logical expression. Open
Open
if (!isBlankEditableTextValue(caption) || isEditable) {
return (
<figure className={classNames(styles.root, {[styles.invert]: !darkBackground})}>
{children}
Function configurationEditor
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
configurationEditor() {
this.tab('general', function() {
this.input('videoSource', UrlInputView, {
supportedHosts: [
'http://youtu.be',
Function constructor
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor(props, context) {
super(props, context);
this.displaysTextTracksInNativePlayer =
this.props.hasNativeVideoPlayer && tagName == 'video';
Function constructor
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor(props, context) {
super(props, context);
this.state = {
handleWidth: null,
Function update
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const update = useMemo(() => {
let timeout;
return {
activate(href, openInNewTab, linkRef) {
Method scrolled_favicons_for_entry
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def scrolled_favicons_for_entry(entry, entry_mode: :published)
render(
'pageflow_scrolled/favicons/entry',
manifest_path: entry_mode == :published && pageflow.entry_manifest_path(
entry,
Method entry_global_links
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def entry_global_links(entry)
links = []
if entry.site.imprint_link_label.present? && entry.site.imprint_link_url.present?
links << link_to(
Function _renderItem
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_renderItem: function(ul, item) {
var widget = this;
var li = $('<li>', { class: item.value });
var container = $('<div>', { class: 'text-container' }).appendTo(li);
var index = options.values.indexOf(item.value);
Function onRender
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
onRender: function() {
var entry = this.options.entry;
var fileType = this.options.fileType;
var collection = entry.getFileCollection(fileType);
var blankSlateText = I18n.t('pageflow.editor.templates.files_blank_slate.no_files');
Function default
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function(pageStateReducers) {
const pageReducers = {};
function getPageReducer(type) {
pageReducers[type] = pageReducers[type] || combineReducers({
Function onRender
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
onRender: function() {
this.pageViews = this.subview(new CollectionView({
el: this.ui.entry,
collection: this.pages,
itemViewConstructor: PagePreviewView,
Function createScrollPositionProvider
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function createScrollPositionProvider(Context, emitter, originalWrapper) {
const OriginalWrapper = originalWrapper ||
function Noop({children}) { return children; };
return function ScrollPositionProvider({children}) {
Function configurationEditor
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
configurationEditor({entry}) {
this.tab('general', function() {
this.input('id', FileInputView, {
collection: 'audio_files',
fileSelectionHandler: 'contentElementConfiguration',
Function mouseover [data-tooltip]
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
'mouseover [data-tooltip]': function(event) {
if (!this.tooltip.visible) {
var target = $(event.currentTarget);
var key = target.attr('data-tooltip');
var position;