Just put a comment before the beginning and end of the plugin, for instance: /* FITVIDSFITVIDSFITVIDSFITVIDS */
Then in Sublime text, find, switch on Regex and copy the following, replacing the two FITVIDSFITVIDSFITVIDSFITVIDS
bits.
/\* FITVIDSFITVIDSFITVIDSFITVIDS \*/[\s\S]*/\* FITVIDSFITVIDSFITVIDSFITVIDS \*/
I recently started using the fantastic Laravel for a number of PHP web projects.
Being from a Wordpress background the learning curve has been pretty steep – but I started writing down every problem I had and how I fixed it. You can find my 'research' here:
Laravel Notes
I've recently started Eight Arms Ltd with my good friends Cheryl and Matt. Here's to the future!

So if things are a little quiet here, check out what is going on there, instead.
djave.
Ends:
That is all. Be careful.
var numbers = [1,2,3,4,5,6,7,8,9,10];
for(var i=0; i<numbers.length; i++){
if(numbers[i] - 5 < 0){
numbers.splice(i,1);
}
}
console.log(numbers);
//Logs: [2, 4, 5, 6, 7, 8, 9, 10]
The problem is, when you splice inside a for loop, you're ruining the index that you're using to reference the other elements in the array. There are some really smart ways to get around this using jquery's $.grep function, but there's also a simpler way, assuming you don't need to do anything in an upward order - you can just reverse the for loop, using -- rather than ++.
Like so:
var numbers = [1,2,3,4,5,6,7,8,9,10];
for(i=numbers.length-1; i>=0;i--){
if(numbers[i] - 5 < 0){
numbers.splice(i,1);
}
}
console.log(numbers);
//Logs: [5, 6, 7, 8, 9, 10]
Because you start at the top, none of the values get upset when you start permanently deleting and shifting values across. Enjoy!
Ends:
Phew, check this one out! Just made it in < 30 minutes. I'm late for all my appointments... better run!
See the Pen Typo - a writing function by djave_co (@sheepysheep60) on CodePen
Ends: